Sha256: 1374ffadadf8d35e9c73bf76086f4d018bf58f378c50749fb6d28bf222219cf1
Contents?: true
Size: 698 Bytes
Versions: 4
Compression:
Stored size: 698 Bytes
Contents
#!/usr/bin/env ruby # -*- ruby -*- require 'rubygems' require 'daemon_spawn' class DelayedJobWorker < DaemonSpawn::Base def start(args) ENV['RAILS_ENV'] ||= args.first || 'development' Dir.chdir ENV['RAILS_ROOT'] require File.join('config', 'environment') Delayed::Worker.new.start end def stop system("kill `cat #{ENV['RAILS_ROOT']}/tmp/pids/delayed_job.pid`") end end DelayedJobWorker.spawn!(:log_file => File.join(ENV['RAILS_ROOT'], "log", "delayed_job.log"), :pid_file => File.join(ENV['RAILS_ROOT'], 'tmp', 'pids', 'delayed_job.pid'), :sync_log => true, :working_dir => ENV['RAILS_ROOT'])
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
chili_videos-0.2.2 | bin/delayed_job |
chili_videos-0.2.1 | bin/delayed_job |
chili_videos-0.2.0 | bin/delayed_job |
chili_videos-0.1.0 | bin/delayed_job |