Home:ALL Converter>How to make cadence workers stop accepting new tasks

How to make cadence workers stop accepting new tasks

Ask Time:2022-06-14T15:43:57         Author:Tarun Singhal

Json Formatter

I want to achieve a use-case where, during graceful scale-down, I want to ensure that cadence workers do not accept any new jobs. I am using cadence on k8, so I plan to give a terminationGracePeriodSeconds to a known maximum timeout by which I know that all the in-progress tasks will be finished on that particular pod. Hence new tasks will be allocated only to active workers.

My use case is that my activity has large startToClose timeout and during deployment, the activity task will be picked up and cannot complete until the timeout and retry.

Author:Tarun Singhal,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/72613203/how-to-make-cadence-workers-stop-accepting-new-tasks
yy