Reputation: 2357
I have a resque job that I want one and only one instance of always running. As soon as the job finishes I would like it to be immediately be enqueued again.
I could use Resque.enqueue_in
but then the question becomes how to make sure it is initially enqueued when the app is rebooted.
Upvotes: 1
Views: 154
Reputation: 2963
Add initial enqueue code to custom initializer in config/initializers. Read more here.
Upvotes: 1
Reputation: 1313
Cant you have a piece of code that works on booting the rails app and that en-queues the job for the first time ? application.rb maybe.
Upvotes: 0