X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FWorkerOptions.html;h=cb505a286755a7b8aa186d4b7a6ed07a404d5cea;hb=8cc4ea811611b8ad77c7b0379911afe497f2e7e4;hp=4fdd1c0b1c31d55e7b1aee653b5ec1675032df2a;hpb=85003dff831b309b12d624215a8d67634af82b50;p=poolifier.git diff --git a/docs/interfaces/WorkerOptions.html b/docs/interfaces/WorkerOptions.html index 4fdd1c0b..cb505a28 100644 --- a/docs/interfaces/WorkerOptions.html +++ b/docs/interfaces/WorkerOptions.html @@ -1,4 +1,4 @@ -
This option will be removed in the next major version.
Optional
kill
+killBehavior
dictates if your async unit (worker/process) will be deleted in case that a task is active on it.killBehavior
dictates if your worker will be deleted in case a task is active on it.currentTime - lastActiveTime
is greater thanmaxInactiveTime
but a task is still executing or queued, then the worker won't be deleted.currentTime - lastActiveTime
is greater thanmaxInactiveTime
but a task is still executing or queued, then the worker will be deleted.Default Value
KillBehaviors.SOFT
Handler
+Optional
killThe function to call when a worker is killed.
+Optional
maxMaximum waiting time in milliseconds for tasks.
+Maximum waiting time in milliseconds for tasks on newly created workers.
After this time, newly created workers will be terminated. -The last active time of your worker unit will be updated when a task is submitted to a worker or when a worker terminate a task.
+The last active time of your worker will be updated when it terminates a task.killBehavior
is set toKillBehaviors.HARD
this value represents also the timeout for the tasks that you submit to the pool, -when this timeout expires your tasks is interrupted and the worker is killed if is not part of the minimum size of the pool.killBehavior
is set toKillBehaviors.SOFT
your tasks have no timeout and your workers will not be terminated until your task is completed.Default Value
60000