From 353260e334c7f801b1236890f3a0cb8a98ed2b8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 24 May 2023 19:28:00 +0200 Subject: [PATCH] refactor: cleanup worker options MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 2 -- src/worker/abstract-worker.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/README.md b/README.md index 6d4c35ef..18b0d78a 100644 --- a/README.md +++ b/README.md @@ -218,8 +218,6 @@ This method will call the terminate method on each worker. If `killBehavior` is set to `KillBehaviors.SOFT` your tasks have no timeout and your workers will not be terminated until your task is completed. Default: 60000 -- `async` (optional) - true/false. Set to true if your function contains async code pieces, else false. - Default: false - `killBehavior` (optional) - Dictates if your async unit (worker/process) will be deleted in case that a task is active on it. **KillBehaviors.SOFT**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker **won't** be deleted. **KillBehaviors.HARD**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 16373669..a7060770 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -87,7 +87,6 @@ export abstract class AbstractWorker< this.opts.killBehavior = opts.killBehavior ?? DEFAULT_KILL_BEHAVIOR this.opts.maxInactiveTime = opts.maxInactiveTime ?? DEFAULT_MAX_INACTIVE_TIME - this.opts.async = opts.async ?? false } /** -- 2.34.1