@emartech/program-executor 3.9.2 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.16.0
1
+ 20.18.0
package/package.json CHANGED
@@ -22,14 +22,14 @@
22
22
  "graphql": "^15.5.0"
23
23
  },
24
24
  "engines": {
25
- "node": "14.4.0"
25
+ "node": "20.18.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "chai": "^4.3.10",
29
29
  "chai-as-promised": "7.1.1",
30
30
  "chai-string": "1.5.0",
31
31
  "chai-subset": "1.6.0",
32
- "dotenv": "^16.3.1",
32
+ "dotenv": "^16.4.1",
33
33
  "eslint": "^8.52.0",
34
34
  "eslint-config-emarsys": "5.1.0",
35
35
  "eslint-plugin-mocha": "^10.2.0",
@@ -42,5 +42,5 @@
42
42
  "sinon": "9.2.4",
43
43
  "sinon-chai": "^3.7.0"
44
44
  },
45
- "version": "3.9.2"
45
+ "version": "3.10.0"
46
46
  }
@@ -14,12 +14,12 @@ class ProgramExecutorProcessor {
14
14
 
15
15
  async process(message) {
16
16
  const { runId } = message;
17
- devLogger.info('new job from queue', { runId, OSPID: process.pid });
17
+ devLogger.info('new job from queue', { run_id: runId, OSPID: process.pid });
18
18
 
19
19
  try {
20
20
  await this._executeNextJob(message);
21
21
  } catch (error) {
22
- devLogger.error('error in job', { runId, OSPID: process.pid,
22
+ devLogger.error('error in job', { run_id: runId, OSPID: process.pid,
23
23
  error, errorMessage: error.message, errorCode: error.code,
24
24
  errorRetryable: error.retryable, errorIgnorable: error.ignorable });
25
25
  if (error.retryable) {
@@ -60,11 +60,11 @@ class ProgramExecutorProcessor {
60
60
 
61
61
  const remainingJobs = jobs.slice(1);
62
62
  if (remainingJobs.length > 0) {
63
- devLogger.info('queue update remainingJobs', { remainingJobs, runId, OSPID: process.pid });
63
+ devLogger.info('queue update remainingJobs', { remainingJobs, run_id: runId, OSPID: process.pid });
64
64
  await this._queueManager.queueProgram({ ...message, jobs: remainingJobs });
65
65
  await this._programHandler.incrementStep(runId);
66
66
  } else {
67
- devLogger.info('finished program', { runId, OSPID: process.pid });
67
+ devLogger.info('finished program', { run_id: runId, OSPID: process.pid });
68
68
  await this._programHandler.finishProgram(runId);
69
69
  }
70
70
  }
@@ -52,7 +52,7 @@ class ProgramHandler {
52
52
 
53
53
  jobData[jobName] = merge ? { ...jobData[jobName], ...payload } : payload;
54
54
 
55
- devLogger.info('db update job data', { runId, jobName, payload, merge, OSPID: process.pid });
55
+ devLogger.info('db update job data', { run_id: runId, jobName, payload: JSON.stringify(payload), merge, OSPID: process.pid });
56
56
  return this._programsRepository.setJobDataByRunId(runId, jobData);
57
57
  }
58
58