Skip to content Skip to sidebar Skip to footer

How Can I Properly Kill A Celery Task In A Kubernetes Environment?

How can I properly kill celery tasks running on containers inside a kubernetes environment? The structure of the whole application (all written in Python) is as follows: A SDK tha

Solution 1:

The solution I found was to write to file shared by both API and Celery containers. In this file, whenever an interruption is captured, a flag is set to true. Inside the celery containers I keep periodically checking the contents of such file. If the flag is set to true, then I gracefully clear things up and raise an error.


Post a Comment for "How Can I Properly Kill A Celery Task In A Kubernetes Environment?"