Skip to content

Instantly share code, notes, and snippets.

/t.rb

Created Sep 16, 2011
Embed
What would you like to do?
require 'rubygems'
require 'rufus-json/automatic'
require 'ruote'
engine = Ruote::Dashboard.new(
Ruote::Worker.new(
Ruote::HashStorage.new()))
engine.register 'computer' do |workitem|
workitem.fields['hello'] = 'world'
end
engine.register 'human', Ruote::StorageParticipant
engine.noisy = true
pdef = Ruote.define do
computer
human
end
initial_workitem_fields = { 'a' => 'b' }
engine.launch(pdef, initial_workitem_fields)
sleep 5
puts "human: there are #{engine.storage_participant.size} workitems waiting for me"
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.