Skip to content

Instantly share code, notes, and snippets.

@mateusg
Last active December 12, 2015 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mateusg/4686811 to your computer and use it in GitHub Desktop.
Save mateusg/4686811 to your computer and use it in GitHub Desktop.
Fixes the error caused by NewRelic that prevents Resque workers from dying (https://github.com/defunkt/resque/issues/578#issuecomment-12509400). When newrelic_rpm >= 3.5.6.48 is released, remove this hotfix and update the gem.
# deploy.rb
# Fixes the error that prevents resque workers from dying, caused by NewRelic (https://github.com/defunkt/resque/issues/578#issuecomment-12509400).
# FIXME: When newrelic_rpm >= 3.5.6.48 is released, remove this hotfix and update the gem.
task :set_newrelic_false, :roles => [:resque_worker, :resque_scheduler] do
default_run_options[:env] = { 'NEWRELIC_ENABLE' => false }
end
before('resque:start', 'set_newrelic_false')
before('resque:scheduler:start', 'set_newrelic_false')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment