Sha256: e147589ab110afa94be21bea881da7f575571743312738ca7bce6b47dd11ed35

Contents?: true

Size: 1.04 KB

Versions: 57

Compression:

Stored size: 1.04 KB

Contents

namespace :rubber do

  namespace :resque_scheduler do

    rubber.allow_optional_tasks(self)

    before "deploy:stop", "rubber:resque_scheduler:stop"
    after "deploy:start", "rubber:resque_scheduler:start"
    after "deploy:restart", "rubber:resque_scheduler:restart"
    
    desc "Stops the resque_scheduler"
    task :stop, :roles => :resque_scheduler do
      rsudo "service resque-scheduler stop || true"
    end

    desc "Starts the resque_scheduler"
    task :start, :roles => :resque_scheduler do
      rsudo "service resque-scheduler start"
    end

    desc "Restarts the resque_scheduler"
    task :restart, :roles => :resque_scheduler do
      stop
      start      
    end

    # pauses deploy until daemon is up so monit doesn't try and start it
    before "rubber:monit:start", "rubber:resque_scheduler:wait_start"
    task :wait_start, :roles => :resque_scheduler do
      logger.info "Waiting for scheduler daemon pid file to show up"

      run "while ! test -f #{rubber_env.resque_scheduler_pid_file}; do sleep 1; done"
    end


  end

end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
rubber-2.5.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.4.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.4.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.4.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.3.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.3.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.2.4 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.2.3 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.2.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.2.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.2.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.1.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.1.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.1.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.0.8 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.0.7 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.0.6 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb