@rvoh/psychic-workers 0.2.8 → 0.2.9

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.
@@ -273,7 +273,7 @@ class Background {
273
273
  throw new ActivatingBackgroundWorkersWithoutDefaultWorkerConnection();
274
274
  const workerCount = nativeBullMQ.defaultWorkerCount ?? 1;
275
275
  for (let i = 0; i < workerCount; i++) {
276
- this._workers.push(new Background.Worker(formattedQueueName, job => this.doWork(job), {
276
+ this._workers.push(new Background.Worker(formattedQueueName, async (job) => await this.doWork(job), {
277
277
  ...(backgroundOptions.nativeBullMQ.defaultWorkerOptions || {}),
278
278
  connection: defaultWorkerConnection,
279
279
  }));
@@ -315,7 +315,7 @@ class Background {
315
315
  if (!namedWorkerConnection)
316
316
  throw new ActivatingNamedQueueBackgroundWorkersWithoutWorkerConnection(queueName);
317
317
  for (let i = 0; i < extraWorkerCount; i++) {
318
- this._workers.push(new Background.Worker(formattedQueuename, job => this.doWork(job), {
318
+ this._workers.push(new Background.Worker(formattedQueuename, async (job) => await this.doWork(job), {
319
319
  ...extraWorkerOptions,
320
320
  connection: namedWorkerConnection,
321
321
  }));
@@ -269,7 +269,7 @@ export class Background {
269
269
  throw new ActivatingBackgroundWorkersWithoutDefaultWorkerConnection();
270
270
  const workerCount = nativeBullMQ.defaultWorkerCount ?? 1;
271
271
  for (let i = 0; i < workerCount; i++) {
272
- this._workers.push(new Background.Worker(formattedQueueName, job => this.doWork(job), {
272
+ this._workers.push(new Background.Worker(formattedQueueName, async (job) => await this.doWork(job), {
273
273
  ...(backgroundOptions.nativeBullMQ.defaultWorkerOptions || {}),
274
274
  connection: defaultWorkerConnection,
275
275
  }));
@@ -311,7 +311,7 @@ export class Background {
311
311
  if (!namedWorkerConnection)
312
312
  throw new ActivatingNamedQueueBackgroundWorkersWithoutWorkerConnection(queueName);
313
313
  for (let i = 0; i < extraWorkerCount; i++) {
314
- this._workers.push(new Background.Worker(formattedQueuename, job => this.doWork(job), {
314
+ this._workers.push(new Background.Worker(formattedQueuename, async (job) => await this.doWork(job), {
315
315
  ...extraWorkerOptions,
316
316
  connection: namedWorkerConnection,
317
317
  }));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "name": "@rvoh/psychic-workers",
4
4
  "description": "Background job system for Psychic applications",
5
- "version": "0.2.8",
5
+ "version": "0.2.9",
6
6
  "author": "RVO Health",
7
7
  "repository": {
8
8
  "type": "git",