X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fworker-options.ts;h=9ef50adea4f478c78344e8c9a0439cf2547ac228;hb=526c970b0ea1dcb83aab8eb1715f5c60d534bcdf;hp=290914f1693d71b78f6af2445dbd4d1347b6e363;hpb=38e795c12f0e9daeff7b025147f36f85f486366e;p=poolifier.git diff --git a/src/worker/worker-options.ts b/src/worker/worker-options.ts index 290914f1..9ef50ade 100644 --- a/src/worker/worker-options.ts +++ b/src/worker/worker-options.ts @@ -7,7 +7,7 @@ export const KillBehaviors = Object.freeze({ */ SOFT: 'SOFT', /** - * If `lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. + * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. */ HARD: 'HARD' } as const) @@ -20,7 +20,7 @@ export type KillBehavior = keyof typeof KillBehaviors /** * Detects whether the given value is a kill behavior or not. * - * @typeParam KB - Which specific KillBehavior to test against. + * @typeParam KB - Which specific KillBehavior type to test against. * @param killBehavior - Which kind of kill behavior to detect. * @param value - Any value. * @returns `true` if `value` was strictly equals to `killBehavior`, otherwise `false`. @@ -46,7 +46,7 @@ export interface WorkerOptions { * when this timeout expires your tasks is interrupted and the worker is killed if is not part of the minimum size of the pool. * - If `killBehavior` is set to `KillBehaviors.SOFT` your tasks have no timeout and your workers will not be terminated until your task is completed. * - * @defaultValue 60000 ms + * @defaultValue 60000 */ maxInactiveTime?: number /** @@ -59,7 +59,7 @@ export interface WorkerOptions { * `killBehavior` dictates if your async unit (worker/process) will be deleted in case that a task is active on it. * * - SOFT: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker **won't** be deleted. - * - HARD: If `lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. + * - HARD: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still running, then the worker will be deleted. * * This option only apply to the newly created workers. *