1

I am running some dramatiq as kubernetes jobs. The usecase require the pods to shutdown if no messages are in the queue. So what I need is that the dramatiq worker process shutsdown if not messages are in the queue.

Is it possible to do that in dramatiq ?

Saurabh Saxena
  • 1,327
  • 2
  • 13
  • 26

1 Answers1

1

you could use the @dramatiq.actor(max_retries=-1) decorator, that will result in the worker quitting once it has handled all of the messages in the queue

Roniel López
  • 403
  • 2
  • 10