Sha256: 9cfb2349f29c42ea6197d7934c3294e5036d67ffea0e6d065a5036039a734b68

Contents?: true

Size: 805 Bytes

Versions: 2

Compression:

Stored size: 805 Bytes

Contents

Capistrano::Configuration.instance(true).load do
  set :delayed_script_path, 'script/delayed_job'
  set :delayed_job_env, 'production'
  set :base_ruby_path,    '/usr'
  
  namespace :delayed_job do
    desc "Start delayed_job process"
    task :start, :roles => :app do
      run "cd #{current_path} && #{sudo} #{base_ruby_path}/bin/ruby #{delayed_script_path} start #{delayed_job_env}"
    end

    desc "Stop delayed_job process"
    task :stop, :roles => :app do
      run "cd #{current_path} && #{sudo} #{base_ruby_path}/bin/ruby #{delayed_script_path} stop #{delayed_job_env}"
    end

    desc "Restart delayed_job process"
    task :restart, :roles => :app do
      run "cd #{current_path} && #{sudo} #{base_ruby_path}/bin/ruby #{delayed_script_path} restart #{delayed_job_env}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nesquena-cap-recipes-0.3.8 lib/cap_recipes/tasks/delayed_job/manage.rb
nesquena-cap-recipes-0.3.9 lib/cap_recipes/tasks/delayed_job/manage.rb