Sha256: a9ff0d50ac8ab5c95070c3a206228de3c85e98144ecf57a8d483a7e02ed79cfe

Contents?: true

Size: 936 Bytes

Versions: 20

Compression:

Stored size: 936 Bytes

Contents

# Capistrano Recipes for managing delayed_job
#
# Add these callbacks to have the delayed_job process restart when the server
# is restarted:
#
#   after "deploy:stop",    "delayed_job:stop"
#   after "deploy:start",   "delayed_job:start"
#   after "deploy:restart", "delayed_job:restart"

Capistrano::Configuration.instance.load do
  namespace :delayed_job do
    def rails_env
      fetch(:rails_env, false) ? "RAILS_ENV=#{fetch(:rails_env)}" : ''
    end
    
    desc "Stop the delayed_job process"
    task :stop, :roles => :app do
      run "cd #{current_path};#{rails_env} script/delayed_job stop"
    end

    desc "Start the delayed_job process"
    task :start, :roles => :app do
      run "cd #{current_path};#{rails_env} script/delayed_job start"
    end

    desc "Restart the delayed_job process"
    task :restart, :roles => :app do
      run "cd #{current_path};#{rails_env} script/delayed_job restart"
    end
  end
end

Version data entries

20 entries across 20 versions & 8 rubygems

Version Path
topprospect-delayed_job-2.0.9 lib/delayed/recipes.rb
topprospect-delayed_job-2.0.8 lib/delayed/recipes.rb
topprospect-delayed_job-2.0.7 lib/delayed/recipes.rb
topprospect-delayed_job-2.0.6 lib/delayed/recipes.rb
topprospect-delayed_job-2.0.5 lib/delayed/recipes.rb
emipair-delayed_job-2.0.3.1 lib/delayed/recipes.rb
delayed_job-2.1.0.pre2 lib/delayed/recipes.rb
jmcnevin-delayed_job-2.0.5 lib/delayed/recipes.rb
jmcnevin-delayed_job-2.0.4 lib/delayed/recipes.rb
opsb-delayed_job-2.0.3 lib/delayed/recipes.rb
delayed_job-2.1.0.pre lib/delayed/recipes.rb
delayed_job-2.0.3 lib/delayed/recipes.rb
efficiency20-delayed_job-1.8.51 lib/delayed/recipes.rb
delayed_job-2.0.2 lib/delayed/recipes.rb
delayed_job-2.0.1 lib/delayed/recipes.rb
delayed_job-2.0.0 lib/delayed/recipes.rb
delayed_job-1.9.0pre lib/delayed/recipes.rb
delayed_job-1.8.5 lib/delayed/recipes.rb
moneypools-delayed_job-1.8.4 lib/delayed/recipes.rb
koombea-delayed_job-1.8.5 lib/delayed/recipes.rb