Skip to content

Instantly share code, notes, and snippets.

@wpeterson wpeterson/Gemfile.lock Secret

Created Feb 17, 2012
Embed
What would you like to do?
class Alpha < WorkerCommand
@queue = :alpha
def self.work
sleep(5)
puts "Alpha"
end
end
$> rake resque:work QUEUE=alpha,beta
Beta
Beta
Beta
Alpha
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
class Beta < WorkerCommand
@queue = :beta
def self.work
sleep(5)
puts "Beta"
end
end
$> rake resque:work QUEUE=beta,alpha
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Beta
Gemfile.lock:231: resque (1.19.0)
Gemfile.lock:236: resque-meta (1.0.3)
Gemfile.lock:237: resque (~> 1.8)
Gemfile.lock:238: resque-scheduler (1.9.9)
Gemfile.lock:240: resque (>= 1.8.0)
Gemfile.lock:242: resque_mailer (1.0.1)
Gemfile.lock:390: resque (= 1.19.0)
Gemfile.lock:391: resque-meta (= 1.0.3)
Gemfile.lock:392: resque-scheduler (= 1.9.9)
Gemfile.lock:393: resque_mailer (= 1.0.1)
>> 100.times { Resque.enqueue Beta }
=> 100
# Wait for both workers to start processing Beta jobs on queue...
# Now add a high-priority Alpha job
>> Resque.enqueue Alpha
=> []
>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.