Sha256: 1db27c86b7a8a5326c4afea8b6ae06e505e4b558f37e211ff825c236dbe6a0ab
Contents?: true
Size: 941 Bytes
Versions: 7
Compression:
Stored size: 941 Bytes
Contents
namespace :delayed_job do desc "Setup delayed job" desc "Setup delayed configuration for this application" task :setup, roles: :web do template "delayed_job_init.erb", "/tmp/delayed" run "#{sudo} mv /tmp/delayed /etc/init.d/#{application}_delayed" run "#{sudo} chmod +x /etc/init.d/#{application}_delayed" run "#{sudo} update-rc.d #{application}_delayed defaults" end desc "Setup delayed job monit configuration for this application" task :setup_monit, roles: :web do run "#{sudo} apt-get -y install monit" template "monit_delayed_config.erb", "/tmp/delayed_monit" run "#{sudo} mv /tmp/delayed_monit /etc/monit/conf.d/#{application}_delayed" run "#{sudo} monit reload" run "#{sudo} monit start all" end %w[start stop reindex].each do |command| desc "#{command} delayed" task command, roles: :web do run "/etc/init.d/#{application}_delayed #{command}" end end end
Version data entries
7 entries across 7 versions & 1 rubygems