Commit 08d267cb by Karl Kloppenborg Committed by GitHub

Merge pull request #6 from Tensho/reenable-stop-rake-task

Make sneakers:stop task perpetually callable
parents 63514ab5 3548cd1a
...@@ -97,12 +97,12 @@ namespace :sneakers do ...@@ -97,12 +97,12 @@ namespace :sneakers do
raise "[ set :workers, ['worker1', 'workerN'] ] not configured properly, please configure the workers you wish to use" if fetch(:sneakers_workers).nil? or fetch(:sneakers_workers) == false or !fetch(:sneakers_workers).kind_of? Array raise "[ set :workers, ['worker1', 'workerN'] ] not configured properly, please configure the workers you wish to use" if fetch(:sneakers_workers).nil? or fetch(:sneakers_workers) == false or !fetch(:sneakers_workers).kind_of? Array
workers = fetch(:sneakers_workers).compact.join(',') workers = fetch(:sneakers_workers).compact.join(',')
#run "cmd", env: { 'WORKERS' => workers } #export this to environmental variable #run "cmd", env: { 'WORKERS' => workers } #export this to environmental variable
info "Starting the sneakers processes" info "Starting the sneakers processes"
#workers.each do |worker| #workers.each do |worker|
with rails_env: fetch(:sneakers_env), workers: workers do with rails_env: fetch(:sneakers_env), workers: workers do
rake 'sneakers:run' rake 'sneakers:run'
end end
#execute :bundle, :exec, :sneakers, args.compact.join(' ') #execute :bundle, :exec, :sneakers, args.compact.join(' ')
...@@ -189,6 +189,7 @@ namespace :sneakers do ...@@ -189,6 +189,7 @@ namespace :sneakers do
end end
end end
end end
Rake::Task["sneakers:stop"].reenable
end end
desc 'Start sneakers' desc 'Start sneakers'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment