Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Commit

Permalink
Fix the deploy script for restarting/starting workers and conditional…
Browse files Browse the repository at this point in the history
…ly deploy to heroku
  • Loading branch information
alexcrichton committed Sep 9, 2011
1 parent 8454790 commit c79bb73
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/deploy.rb
Expand Up @@ -44,14 +44,14 @@
task :push_to_heroku do
system 'git push heroku master'
end
before 'deploy:update_code', 'deploy:push_to_heroku'
before 'deploy:update_code', 'deploy:push_to_heroku' if ENV['HEROKU'] != 'no'
end

namespace :workers do
task :start_queue do
run "cd #{current_release} && " \
"nohup bundle exec rake environment resque:work " \
"QUEUE=cleaner,convert_song,scrobble,songs --trace " \
"QUEUE=cleaner,convert_song,scrobble,songs VERBOSE=1 --trace " \
"&>> log/queue.log &|"
end

Expand All @@ -61,8 +61,8 @@
end

task :start do
foreman.start_queue
foreman.start_fargo
workers.start_queue
workers.start_fargo
end

desc 'Stop just the queue worker process'
Expand All @@ -77,13 +77,13 @@

desc 'Stop the foreman processes'
task :stop do
foreman.stop_queue
foreman.stop_fargo
workers.stop_queue
workers.stop_fargo
end

desc 'Restart the foreman processes'
task :restart do
foreman.stop
foreman.start
workers.stop
workers.start
end
end

0 comments on commit c79bb73

Please sign in to comment.