Run rubocop --fix-layout and remove encoding comments
This commit is contained in:
parent
fa63e6e81d
commit
ea2862fdef
283 changed files with 1164 additions and 1969 deletions
|
|
@ -2,9 +2,9 @@ require "resque/tasks"
|
|||
|
||||
def run_worker(queue, count = 1)
|
||||
puts "Starting #{count} worker(s) with QUEUE: #{queue}"
|
||||
ops = {:pgroup => true, :err => ["log/resque_worker_foodsoft_notifier.log", "a"],
|
||||
:out => ["log/resque_worker_foodsoft_notifier.log", "a"]}
|
||||
env_vars = {"QUEUE" => queue.to_s, "PIDFILE" => "tmp/pids/resque_worker_foodsoft_notifier.pid"}
|
||||
ops = { :pgroup => true, :err => ["log/resque_worker_foodsoft_notifier.log", "a"],
|
||||
:out => ["log/resque_worker_foodsoft_notifier.log", "a"] }
|
||||
env_vars = { "QUEUE" => queue.to_s, "PIDFILE" => "tmp/pids/resque_worker_foodsoft_notifier.pid" }
|
||||
count.times {
|
||||
## Using Kernel.spawn and Process.detach because regular system() call would
|
||||
## cause the processes to quit when capistrano finishes
|
||||
|
|
@ -21,7 +21,7 @@ namespace :resque do
|
|||
Rake::Task['resque:stop_workers'].invoke
|
||||
Rake::Task['resque:start_workers'].invoke
|
||||
end
|
||||
|
||||
|
||||
desc "Quit running workers"
|
||||
task :stop_workers do
|
||||
pids = File.read('tmp/pids/resque_worker_foodsoft_notifier.pid').split("\n")
|
||||
|
|
@ -33,9 +33,9 @@ namespace :resque do
|
|||
system(syscmd)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Start workers"
|
||||
task :start_workers do
|
||||
run_worker("foodsoft_notifier")
|
||||
run_worker("foodsoft_notifier")
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue