Skip to content

Instantly share code, notes, and snippets.

@moritzheiber
Created April 21, 2012 16:05
Show Gist options
  • Select an option

  • Save moritzheiber/2438021 to your computer and use it in GitHub Desktop.

Select an option

Save moritzheiber/2438021 to your computer and use it in GitHub Desktop.
foreverb calling foreverb
# foreverb master
# written in pseudo-code
Foreverb.run :queue => current_queue do
check_for_new_command_in_queue (start/stop workers)
start/stop worksers (as foreverb "sub"-workers)
before :each do
check_amqp_for_new_messages (using carrot or official client)
process_message
set_queue (e.g. {stop worker X, start worker Y with count Z)
end
before :all do
init_amqp_connection
end
after :all do
close_amqp_connection
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment