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-3.2.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-3.2.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-3.2.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-3.1.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-3.0.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-3.0.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.16.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.15.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.15.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.15.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.14.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.13.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.13.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.12.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.12.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.12.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.11.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.10.2 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.10.1 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb
rubber-2.10.0 templates/resque_scheduler/config/rubber/deploy-resque_scheduler.rb