@rvoh/psychic-workers 0.2.6 → 0.2.8

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.
@@ -173,7 +173,7 @@ class Background {
173
173
  throw new ActivatingBackgroundWorkersWithoutDefaultWorkerConnection();
174
174
  const workerCount = backgroundOptions.defaultWorkstream?.workerCount ?? 1;
175
175
  for (let i = 0; i < workerCount; i++) {
176
- this._workers.push(new Background.Worker(formattedQueueName, job => this.doWork(job), {
176
+ this._workers.push(new Background.Worker(formattedQueueName, async (job) => await this.doWork(job), {
177
177
  connection: defaultWorkerConnection,
178
178
  concurrency: backgroundOptions.defaultWorkstream?.concurrency || 1,
179
179
  }));
@@ -216,7 +216,7 @@ class Background {
216
216
  throw new ActivatingNamedQueueBackgroundWorkersWithoutWorkerConnection(namedWorkstream.name);
217
217
  const workerCount = namedWorkstream.workerCount ?? 1;
218
218
  for (let i = 0; i < workerCount; i++) {
219
- this._workers.push(new Background.Worker(namedWorkstreamFormattedQueueName, job => this.doWork(job), {
219
+ this._workers.push(new Background.Worker(namedWorkstreamFormattedQueueName, async (job) => await this.doWork(job), {
220
220
  group: {
221
221
  id: namedWorkstream.name,
222
222
  limit: namedWorkstream.rateLimit,
@@ -169,7 +169,7 @@ export class Background {
169
169
  throw new ActivatingBackgroundWorkersWithoutDefaultWorkerConnection();
170
170
  const workerCount = backgroundOptions.defaultWorkstream?.workerCount ?? 1;
171
171
  for (let i = 0; i < workerCount; i++) {
172
- this._workers.push(new Background.Worker(formattedQueueName, job => this.doWork(job), {
172
+ this._workers.push(new Background.Worker(formattedQueueName, async (job) => await this.doWork(job), {
173
173
  connection: defaultWorkerConnection,
174
174
  concurrency: backgroundOptions.defaultWorkstream?.concurrency || 1,
175
175
  }));
@@ -212,7 +212,7 @@ export class Background {
212
212
  throw new ActivatingNamedQueueBackgroundWorkersWithoutWorkerConnection(namedWorkstream.name);
213
213
  const workerCount = namedWorkstream.workerCount ?? 1;
214
214
  for (let i = 0; i < workerCount; i++) {
215
- this._workers.push(new Background.Worker(namedWorkstreamFormattedQueueName, job => this.doWork(job), {
215
+ this._workers.push(new Background.Worker(namedWorkstreamFormattedQueueName, async (job) => await this.doWork(job), {
216
216
  group: {
217
217
  id: namedWorkstream.name,
218
218
  limit: namedWorkstream.rateLimit,
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.6",
5
+ "version": "0.2.8",
6
6
  "author": "RVO Health",
7
7
  "repository": {
8
8
  "type": "git",
@@ -30,6 +30,8 @@
30
30
  "uspec": "vitest --config ./spec/unit/vite.config.ts",
31
31
  "format": "yarn run prettier . --write",
32
32
  "lint": "yarn run eslint --no-warn-ignored \"src/**/*.ts\" && yarn run prettier . --check",
33
+ "console": "tsx ./src/conf/repl.ts",
34
+ "consolejs": "node ./dist/src/conf/repl.js",
33
35
  "prepack": "yarn build",
34
36
  "dev-worker": "NODE_ENV=development WORKER_COUNT=1 ts-node --transpile-only ./test-app/worker.ts"
35
37
  },
@@ -41,9 +43,9 @@
41
43
  },
42
44
  "devDependencies": {
43
45
  "@eslint/js": "=9.0.0",
44
- "@rvoh/dream": "^0.31.0",
46
+ "@rvoh/dream": "^0.33.0",
45
47
  "@rvoh/dream-spec-helpers": "^0.2.0",
46
- "@rvoh/psychic": "^0.25.0",
48
+ "@rvoh/psychic": "^0.28.0",
47
49
  "@rvoh/psychic-spec-helpers": "^0.3.0",
48
50
  "@socket.io/redis-adapter": "^8.3.0",
49
51
  "@socket.io/redis-emitter": "^5.1.0",
@@ -51,7 +53,7 @@
51
53
  "@types/node": "^22.5.1",
52
54
  "@types/pg": "^8",
53
55
  "@types/supertest": "^6.0.2",
54
- "bullmq": "^5.12.12",
56
+ "bullmq": "^5.49.1",
55
57
  "eslint": "^9.9.1",
56
58
  "express": "^4.21.2",
57
59
  "ioredis": "^5.4.1",
@@ -68,7 +70,7 @@
68
70
  "typedoc": "^0.26.6",
69
71
  "typescript": "^5.8.2",
70
72
  "typescript-eslint": "=7.18.0",
71
- "vitest": "^3.0.9"
73
+ "vitest": "^3.1.1"
72
74
  },
73
75
  "packageManager": "yarn@4.7.0"
74
76
  }