diff --git a/__tests__/plugins/jobLock.ts b/__tests__/plugins/jobLock.ts index c4bc0010..535ec475 100644 --- a/__tests__/plugins/jobLock.ts +++ b/__tests__/plugins/jobLock.ts @@ -91,7 +91,7 @@ describe("plugins", () => { worker1.end(); worker2.end(); expect(new Date().getTime() - startTime).toBeLessThan(jobDelay * 3); - resolve(); + resolve(null); } }; diff --git a/package.json b/package.json index 847f941a..61efe012 100644 --- a/package.json +++ b/package.json @@ -29,17 +29,17 @@ "ioredis": "^4.19.2" }, "devDependencies": { - "@types/ioredis": "^4.17.7", - "@types/jest": "^26.0.15", - "@types/node": "^14.14.6", - "ioredis-mock": "^5.1.0", + "@types/ioredis": "^4.17.8", + "@types/jest": "^26.0.16", + "@types/node": "^14.14.10", + "ioredis-mock": "^5.2.0", "jest": "^26.6.3", "node-schedule": "^1.3.2", - "prettier": "^2.1.2", - "ts-jest": "^26.4.3", - "ts-node": "^9.0.0", + "prettier": "^2.2.1", + "ts-jest": "^26.4.4", + "ts-node": "^9.1.0", "typedoc": "^0.19.2", - "typescript": "^4.0.5" + "typescript": "^4.1.2" }, "jest": { "testPathIgnorePatterns": [ diff --git a/src/core/multiWorker.ts b/src/core/multiWorker.ts index 7230825e..c4ad1d37 100644 --- a/src/core/multiWorker.ts +++ b/src/core/multiWorker.ts @@ -253,7 +253,7 @@ export class MultiWorker extends EventEmitter { new Promise(async (resolve) => { await worker.end(); await this.cleanupWorker(worker); - return resolve(); + return resolve(null); }) ); }); diff --git a/src/core/scheduler.ts b/src/core/scheduler.ts index 7808d2fc..29e8243c 100644 --- a/src/core/scheduler.ts +++ b/src/core/scheduler.ts @@ -129,7 +129,7 @@ export class Scheduler extends EventEmitter { return new Promise((resolve) => { setTimeout(async () => { await this.end(); - resolve(); + resolve(null); }, this.options.timeout / 2); }); } diff --git a/src/core/worker.ts b/src/core/worker.ts index 1a120c89..dfb1ea46 100644 --- a/src/core/worker.ts +++ b/src/core/worker.ts @@ -169,7 +169,7 @@ export class Worker extends EventEmitter { if (this.working === true) { await new Promise((resolve) => { setTimeout(() => { - resolve(); + resolve(null); }, this.options.timeout); }); return this.end(); @@ -407,7 +407,7 @@ export class Worker extends EventEmitter { await new Promise((resolve) => { setTimeout(() => { this.poll(); - resolve(); + resolve(null); }, this.options.timeout); }); }