We run multiple servers for our application. I'm looking for a way to disable delayed-job workers on a given server via an environment variable while we are still building and configuring that server. I'm imagining setting something in the delayed-job initializer that tells the worker not to try to process any jobs. Something like this...
Delayed::Worker.enabled = false if ENV['DISABLE_DELAYED_JOB'] == 'true'
I don't see any settings that would accomplish that, but I'm wondering if I'm missing something. Is there a way to tell a worker to only process certain queues? I could use that to give the worker a bogus queue name so it would never find any work to do.
Alternatively, is this something I can accomplish with lifecycle hooks or plugins to tell the worker not to reserve or process any jobs.