Skip to content

Instantly share code, notes, and snippets.

@eric
Created December 29, 2008 08:21
Show Gist options
  • Save eric/41214 to your computer and use it in GitHub Desktop.
Save eric/41214 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'daemons'
RAILS_ROOT = File.expand_path(File.join(File.dirname($0), '..'))
options = {
:dir_mode => :normal,
:dir => File.join(RAILS_ROOT, %w(tmp pids)),
:backtrace => true
}
Daemons.run_proc("job_runner", options) do
require File.join(RAILS_ROOT, 'config', 'environment')
Delayed::Worker.new.start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment