X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fworker-options.ts;h=7f9c650694b83c5c1675aa0291f2b312711be522;hb=bcf1c155ec2e2d9208c8f818abd031662bd61d7f;hp=a6af1ec076916ec74fc1d69164aede194e189498;hpb=277c49bfd06bfacb4f18211fb0a3c1803cd33701;p=poolifier.git diff --git a/src/worker/worker-options.ts b/src/worker/worker-options.ts index a6af1ec0..7f9c6506 100644 --- a/src/worker/worker-options.ts +++ b/src/worker/worker-options.ts @@ -1,16 +1,17 @@ /** * Enumeration of kill behaviors. */ -export const KillBehaviors = Object.freeze({ - /** - * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker **wont** be deleted. - */ - SOFT: 'SOFT', - /** - * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker will be deleted. - */ - HARD: 'HARD' -} as const) +export const KillBehaviors: Readonly<{ SOFT: 'SOFT', HARD: 'HARD' }> = + Object.freeze({ + /** + * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker **wont** be deleted. + */ + SOFT: 'SOFT', + /** + * If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker will be deleted. + */ + HARD: 'HARD' + } as const) /** * Kill behavior.