Sha256: 0b1d80552e091f9d2f27d067f9ef2811e9649666edfe5eb1695d5a6ecdaaab4b
Contents?: true
Size: 973 Bytes
Versions: 29
Compression:
Stored size: 973 Bytes
Contents
Capistrano::Configuration.instance(:must_exist).load do define_recipe :delayed_job do |*args| options = args.empty? ? {} : args.first prefix = options[:prefix] || 'dj' set :dj_monit_prefix, prefix unless exists?(:dj_monit_prefix) namespace :delayed_job do desc "Start delayed_job" task :start, :only => {:delayed_job => true} do sudo "/usr/bin/monit start all -g #{dj_monit_prefix}_#{application}" end desc "Stop delayed_job" task :stop, :only => {:delayed_job => true} do sudo "/usr/bin/monit stop all -g #{dj_monit_prefix}_#{application}" end desc "Restart delayed_job" task :restart, :only => {:delayed_job => true} do sudo "/usr/bin/monit restart all -g #{dj_monit_prefix}_#{application}" end end after "deploy:restart", "delayed_job:restart" after "deploy:start", "delayed_job:start" after "deploy:stop", "delayed_job:stop" end end
Version data entries
29 entries across 29 versions & 2 rubygems