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

Proposal: Scheduled jobs #19

Closed ono closed 7 years ago

ono commented 7 years ago

Provide an interface to schedule job enqueueing.

API

SampleJob.enqueue(payload, delay: 600_000)

Design

Declare delay queue and set up worker queue as dead letter exchange. When delay option is set, enqueue to delay queue with TTL. When message is expired, it will be moved to worker queue.

ono commented 7 years ago

https://github.com/shinyscorpion/task_bunny/pull/30