Skip to content

Instantly share code, notes, and snippets.

@stympy
Created April 12, 2011 19:43
Show Gist options
  • Save stympy/916233 to your computer and use it in GitHub Desktop.
Save stympy/916233 to your computer and use it in GitHub Desktop.
Initializer with auto-spawn support
Delayed::Worker.auto_scale = true
if Rails.env.production?
Delayed::Worker.auto_scale_manager = ENV['HEROKU_APP'] ? :heroku : :local
else
Delayed::Worker.auto_scale_manager = :local
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment