Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lokalise/background-jobs-common

Package Overview
Dependencies
Maintainers
0
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lokalise/background-jobs-common - npm Package Compare versions

Comparing version 7.2.0 to 7.3.0

2

dist/background-job-processor/monitoring/BackgroundJobProcessorMonitor.d.ts

@@ -22,3 +22,5 @@ import type { BackgroundJobProcessorConfig, BackgroundJobProcessorDependencies } from '../processors/types';

jobStart(job: JobType, requestContext: RequestContext): void;
jobAttemptError(job: JobType, error: unknown, requestContext: RequestContext): void;
jobEnd(job: JobType, requestContext: RequestContext): void;
private buildLogParams;
}

@@ -5,2 +5,3 @@ "use strict";

const tslib_1 = require("tslib");
const node_core_1 = require("@lokalise/node-core");
const ioredis_1 = tslib_1.__importDefault(require("ioredis"));

@@ -65,7 +66,10 @@ const constants_1 = require("../constants");

this.transactionObservabilityManager.start(transactionName, (0, utils_1.resolveJobId)(job));
requestContext.logger.info({ origin: this.processorName }, `Started job ${job.name}`);
requestContext.logger.info(this.buildLogParams(job), `Started job ${job.name}`);
}
jobAttemptError(job, error, requestContext) {
requestContext.logger.error(this.buildLogParams(job, error), `${job.name} try failed`);
}
jobEnd(job, requestContext) {
requestContext.logger.info({
origin: this.processorName,
...this.buildLogParams(job),
isSuccess: job.progress === 100,

@@ -75,2 +79,9 @@ }, `Finished job ${job.name}`);

}
buildLogParams(job, error) {
return {
origin: this.processorName,
jobProgress: job.progress,
...(error ? (0, node_core_1.resolveGlobalErrorLogObject)(error) : {}),
};
}
}

@@ -77,0 +88,0 @@ exports.BackgroundJobProcessorMonitor = BackgroundJobProcessorMonitor;

@@ -192,2 +192,6 @@ "use strict";

}
catch (error) {
this.monitor.jobAttemptError(job, error, requestContext);
throw error;
}
finally {

@@ -194,0 +198,0 @@ this.monitor.jobEnd(job, requestContext);

2

package.json
{
"name": "@lokalise/background-jobs-common",
"version": "7.2.0",
"version": "7.3.0",
"files": ["dist", "LICENSE.md", "README.md"],

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc