Skip to content

Instantly share code, notes, and snippets.

View AaronH's full-sized avatar

Aaron Hurley AaronH

View GitHub Profile
@AaronH
AaronH / delayed_job
Created August 26, 2009 23:41 — forked from akmathur/delayed_job
delayed_job script for daemon-spawn to prevent multiple instances of delayed_job
#!/usr/bin/env ruby
# -*- ruby -*-
require 'rubygems'
require 'daemon-spawn'
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
class DelayedJobWorker < DaemonSpawn::Base
def start(args)
ENV['RAILS_ENV'] ||= args.first || 'development'