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

Declare queues on start #32

Closed ono closed 7 years ago

ono commented 7 years ago

Job.enqueue will be required to have a higher throughput. Although it is safe to make sure the existence of queues before enqueueing, we can't ignore the overhead.

This PR introduces Initializer module and declares the queues on application start. Then remove the queue declaration from job enqueue.