Closed x3mka closed 2 months ago
We have found similar problem, the solution is pretty simple. Write plugin that calls
lifecycle.before(:enqueue) do |job|
next if job.queue
job.queue = 'global'
end
and
lifecycle.before(:execute) do |worker|
next if worker.queues != []
worker.queues = ['global']
end
and add it to config/initializers with
Delayed::Worker.plugins << Delayed::Plugins::StrictGlobalQueue::Plugin
Closing stale
Is it possible to run X workers for the default queue and Y workers for a named queue?
script/delayed_job --pool=default:X --pool=named:Y start doesn't pick jobs from default queue (I think it expects queue name be explicitly set to 'default')
script/delayed_job --pool=named:Y --pool=*:X start runs X+Y workers for 'named' queue.