Sha256: ab40736b975d0ce029528718f3d5f5be5abaf1be9b9c62d837dc2571a8c18639

Contents?: true

Size: 332 Bytes

Versions: 5

Compression:

Stored size: 332 Bytes

Contents

require 'resque/tasks'

desc "Start multiple Resque workers using environment"
task :workers => [ :environment ] do
  threads = []
  (ENV['COUNT'] || '1').to_i.times do
    threads << Thread.new do
      system "rake environment resque:work" # XXX is better way to do this?
    end
  end
  threads.each { |thread| thread.join }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
robot-controller-0.3.6 lib/robot-controller/tasks.rb
robot-controller-0.3.5 lib/robot-controller/tasks.rb
robot-controller-0.3.3 lib/robot-controller/tasks.rb
robot-controller-0.3.4 lib/robot-controller/tasks.rb
robot-controller-0.3.2 lib/robot-controller/tasks.rb