Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created October 7, 2008 23:40
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 agibralter/15415 to your computer and use it in GitHub Desktop.
Save agibralter/15415 to your computer and use it in GitHub Desktop.
god log listeners
I [2008-10-07 23:30:16] INFO: listener-process stop: RAILS_ENV=staging /home/a/staging.site.com/current/script/workling_starling_client stop
W [2008-10-07 23:30:17] WARN: listener-process stop command exited with non-zero code = 1
W [2008-10-07 23:30:27] WARN: listener-process process still running 10 seconds after stop command returned. Force killing.
I [2008-10-07 23:30:27] INFO: listener-process before_start: deleted pid file (CleanPidFile)
I [2008-10-07 23:30:27] INFO: listener-process start: RAILS_ENV=staging /home/a/staging.site.com/current/script/workling_starling_client start
W [2008-10-07 23:30:27] WARN: listener-process start command exited with non-zero code = 1
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
workling = File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'workling', 'script', 'listen.rb')
options = {
:app_name => "workling",
:ARGV => ARGV,
:dir_mode => :normal,
:dir => File.join(File.dirname(__FILE__), '..', 'tmp', 'pids'),
:log_output => true,
:multiple => false,
:backtrace => true,
:monitor => true
}
Daemons.run(workling, options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment