when running script/delayed_job
, NewRelic wasn't receiving any of my DJ reporting. Setting some environmental variable fixed that:
Last active
December 16, 2015 21:59
-
-
Save michaelglass/5504133 to your computer and use it in GitHub Desktop.
NewRelic integration with Daemonized DelayedJob
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
rails_root = File.expand_path('..', File.dirname(__FILE__) ) | |
config_dir = File.join rails_root, 'config' | |
ENV['NRCONFIG'] ||= File.join(config_dir, 'newrelic.yml') | |
ENV['NEW_RELIC_LOG'] ||= File.join(rails_root, 'log', 'newrelic_agent.log') | |
require File.join(config_dir, 'environment') | |
require 'delayed/command' | |
Delayed::Command.new(ARGV).daemonize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment