X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fapi.md;h=28e6aad2c3b56bf529890aad889c9029e4b69777;hb=152e87a8c57c8cbd3a3b437106bcc79c30fcc720;hp=458017a18d79ff284a479e16de94580befd44709;hpb=720a70ccade062ef5cdd04c7f8ae6190c60cc5e2;p=poolifier.git diff --git a/docs/api.md b/docs/api.md index 458017a1..28e6aad2 100644 --- a/docs/api.md +++ b/docs/api.md @@ -153,8 +153,8 @@ An object with these properties: `opts` (optional) An object with these properties: - `killBehavior` (optional) - Dictates if your worker will be deleted in case a task is active on it. - **KillBehaviors.SOFT**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker **won't** be deleted. - **KillBehaviors.HARD**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but a task is still executing or queued, then the worker will be deleted. + **KillBehaviors.SOFT**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but the worker is stealing tasks or a task is executing or queued, then the worker **won't** be deleted. + **KillBehaviors.HARD**: If `currentTime - lastActiveTime` is greater than `maxInactiveTime` but the worker is stealing tasks or a task is executing or queued, then the worker will be deleted. This option only apply to the newly created workers. Default: `KillBehaviors.SOFT`