Hi All,
How do I go about running multiple workers when I have remote
participants. It seems the only way to register participants is via an
engine instance. Is it acceptable to have multiple engines as well? I
may be missing something. Here's an example of what I'm trying to
do...
--------------------------------------------------------------------------------------------------------
Run an engine instance...
--------------------------------------------------------------------------------------------------------
@worker = Ruote::Worker.new(Ruote::FsStorage.new('/ruote_work'))
@engine = Ruote::Engine.new(@worker, false)
# Setup listeners
RuoteAMQP::LaunchitemListener.new(@engine,'the_launch_queue')
RuoteAMQP::WorkitemListener.new(@engine,'the_workflow_engine_queue')
# Register participants
@engine.register_participant(:tagging,
RuoteAMQP::Participant.new( :default_queue =>
'remote_participant_queue' ))
# Run
@worker.run
--------------------------------------------------------------------------------------------------------
In another ruby process run just a worker...
--------------------------------------------------------------------------------------------------------
@worker = Ruote::Worker.new(Ruote::FsStorage.new('/ruote_work'))
@worker.run
# This will fail because the worker has no knowledge of the :tagging
participant.
--------------------------------------------------------------------------------------------------------
Can I just do this?
--------------------------------------------------------------------------------------------------------
@worker = Ruote::Worker.new(Ruote::FsStorage.new('/ruote_work'))
@engine = Ruote::Engine.new(@worker, false)
#
# Omit the listener setup
#
# Register participants
@engine.register_participant(:tagging,
RuoteAMQP::Participant.new( :default_queue =>
'remote_participant_queue' ))
# Run
@worker.run
Thanks!
--
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