You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Conductor workers running on Kubernetes pods.
I would like to handle the graceful shutdown in this way:
stop worker polling (I achieved this by implementing the function paused() of the WorkerInterface)
before executing the sys.exit() to terminate the pod, I want to be sure that the current worker executions will be finished without being truncated after the SIGTERM (so all the processes associated to the TaskHandler end)
finally execute sys.exit() to terminate the pod
I noticed that in the TaskRunner class, when the worker is paused, None is returned to the function run_once, but the function run is in a while True loop and I didn't understand how can I be sure when a worker is stopped and finished performing his task,
Is it possible to achieve the behaviour described in the 2nd point?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
Maybe the trick could be: the while True in the TaskRunner class could be replaced by while self.worker.paused() == False. In that way every process would exit from the loop when his current execution finish, right?
Hi everyone,
I have Conductor workers running on Kubernetes pods.
I would like to handle the graceful shutdown in this way:
paused()
of theWorkerInterface
)sys.exit()
to terminate the pod, I want to be sure that the current worker executions will be finished without being truncated after the SIGTERM (so all the processes associated to theTaskHandler
end)sys.exit()
to terminate the podI noticed that in the
TaskRunner
class, when the worker is paused,None
is returned to the functionrun_once
, but the functionrun
is in awhile True
loop and I didn't understand how can I be sure when a worker is stopped and finished performing his task,Is it possible to achieve the behaviour described in the 2nd point?
Thank you in advance.
The text was updated successfully, but these errors were encountered: