On Fri, Apr 30, 2010 at 04:48:26PM -0700, threetee wrote:
>
> ----------
> #!/usr/bin/env ruby
>
> require 'rubygems'
> require 'ruote-amqp'
> require 'ruote-amqp/participant'
> require 'ruote'
> require 'ruote/storage/fs_storage'
>
> engine = Ruote::Engine.new(
> Ruote::Worker.new(
> Ruote::FsStorage.new('ruote_work')
> )
> )
>
> AMQP.settings[:host] = 'rabbitmq'
> # AMQP.settings[:logging] = true
> puts AMQP.settings.inspect
>
> engine.register_participant(:amqp,
> RuoteAMQP::Participant.new(:reply_by_default => true )) do |workitem|
> puts workitem.inspect
> end
>
> pdef = Ruote.process_definition :name => 'print_quote' do
> sequence do
> amqp :queue => 'work1', :command => '/sample/quote'
> end
> end
>
> wfid = engine.launch(pdef)
>
> engine.wait_for(wfid)
> ----------
Hello ThreeTee,
at first a quick disclaimer, I'm ruote's main author, but I haven't much
experience with ruote-amqp.
RuoteAMQP::Participant, as of ruote-amqp 2.1.5, isn't supposed to accept
blocks, it's fun that it works and displays the workitem.
If I understood correctly your ruby example isn't emitting anything to the AMQP
queue, is that right ?
How does
---8<---
engine.register_participant(:amqp, RuoteAMQP::Participant, :reply_by_default
=> true)
--->8---
work though ?
Ruote 2.1 prefers participants registered this way.
Cheers,
--
John Mettraux - http://jmettraux.wordpress.com
--
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en