arcway 0.4.3 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcway",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "A convention-based framework for building modular monoliths with strict domain boundaries.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -111,6 +111,7 @@ async function boot(options) {
111
111
  callbacks,
112
112
  workerPool,
113
113
  plugins,
114
+ appConfig: config,
114
115
  });
115
116
  await jobRunner.init();
116
117
 
@@ -38,6 +38,7 @@ async function discoverJobs(jobsDir) {
38
38
  class JobRunner {
39
39
  _dispatcher;
40
40
  _config;
41
+ _appConfig;
41
42
  _log;
42
43
  _appContext;
43
44
  _jobs = [];
@@ -64,9 +65,11 @@ class JobRunner {
64
65
  callbacks,
65
66
  workerPool,
66
67
  plugins,
68
+ appConfig,
67
69
  } = {},
68
70
  ) {
69
71
  this._config = config;
72
+ this._appConfig = appConfig ?? config;
70
73
  this._log = log;
71
74
  this._dispatcher = new JobDispatcher({
72
75
  backoffMs: config?.backoffMs,
@@ -132,7 +135,7 @@ class JobRunner {
132
135
  meta: this._appContext.meta,
133
136
  log: this._log.extend({ logger: SYSTEM_JOB_DOMAIN }),
134
137
  };
135
- const systemJobs = registerSystemJobs(this._config, this._dispatcher, systemContext);
138
+ const systemJobs = registerSystemJobs(this._appConfig, this._dispatcher, systemContext);
136
139
  for (const sj of systemJobs) {
137
140
  this._log?.info(` ${sj.jobName} (system${sj.schedule ? `, ${sj.schedule}` : ''})`);
138
141
  }