Skip to content

Instantly share code, notes, and snippets.

Created September 18, 2012 01:36
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
beanstalkd rollout!
$ ruby rollout.rb
$ stalk jobs.rb
require 'stalker'
include Stalker
job 'autobots.transform' do |args|
autobot = args[:name]
puts "#{autobot}: chrkhekechk!"
error do |e, job, args|
puts "Call Wheeljack!"
require 'stalker'
1_000_000.times { |n| Stalker.enqueue('autobots.transform', {:name => "10101010#{n}"}) }
Copy link

sdball commented Sep 18, 2012

For fun, start up the worker and then start up rollout.rb. Watch the queuing system race to stay ahead of the jobs!

For optimal watching experience:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment