Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
config.after_initialize do
::RuoteEngine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::Redis::RedisStorage.new(::REDIS)))
RuoteEngine.register_participant :turk_unit, TurkUnitParticipant
RuoteEngine.register_participant :weighted_consensus, WeightedConsensusParticipant
RuoteEngine.register_participant :printer do |workitem|
puts workitem.fields['decisions']['default']['output'].inspect
end
end
Ruote.process_definition :name => 'DefaultWorkflow' do
cursor do
participant :unit, "step_name" => "default", "input" => "${f:task.input}"
participant :weighted_consensus, "step_name" => "default"
rewind :unless => '${f:decisions.default.ok}'
end
end
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.