Skip to content

Instantly share code, notes, and snippets.

/distributed Secret

Created August 11, 2011 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/69cab7f46d14483fd8b7 to your computer and use it in GitHub Desktop.
Save anonymous/69cab7f46d14483fd8b7 to your computer and use it in GitHub Desktop.
#master script located on one server
require 'ruote'
engine = Ruote::Engine.new()
storage = Ruote::RedisStorage.new(http_path/to/storage)
worker = Ruote::Worker.new(storage)
main_proc = engine.process 'main' do
????
end
#slave script located on one or more other server (each slave does the same job)
storage = Ruote::RedisStorage.new(http_path/to/storage)
worker = Ruote::Worker.new(storage)
main_proc = ???? do
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment