shinyscorpion / task_bunny

TaskBunny is a background processing application written in Elixir and uses RabbitMQ as a messaging backend
MIT License
202 stars 30 forks source link

Provide a way to gracefully halt workers #20

Closed ono closed 7 years ago

ono commented 7 years ago

Introduce Worker.stop_consumer/1, WorkerSupervisor.graceful_halt/1 and WorkerSupervisor.graceful_halt/2 to provide a way shut down TaskBunny safely. WorkerSupervisor.graceful_halt/1 will wait for running jobs to finish.