Created
October 2, 2010 18:43
-
-
Save mrrooijen/607883 to your computer and use it in GitHub Desktop.
A replacement script for the one currently in HEAD.
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 | |
require 'rubygems' | |
require 'daemons' | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
PID_DIR = File.join(RAILS_ROOT, 'tmp', 'pids') | |
Daemons.run_proc('delayed_job', { :dir => PID_DIR, :dir_mode => :normal }) do | |
ENV['RAILS_ENV'] ||= 'development' | |
Dir.chdir RAILS_ROOT | |
require File.join('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