Hey Guys,
  Not sure how many of you are using passenger to run your rails apps,
but I'm having a little problem submitting stuff through amqp.  I have
a simple rails app that will start workflows using ruote-amqp.
Everything works fine the first time I submit, but when i try to
submit a second time, i get this error in the logs:

MQ::Error (already subscribed to the queue):
  amqp (0.6.6) lib/mq/queue.rb:319:in `subscribe'
  /opt/ruby-enterprise-1.8.7-2009.10/lib/ruby/gems/1.8/gems/ruote-
amqp-2.1.5/lib/ruote-amqp/workitem_listener.rb:62:in `initialize'
  app/models/submission.rb:38:in `new'
  app/models/submission.rb:38:in `submit_job'
  app/controllers/submissions_controller.rb:62:in `create'
  app/controllers/submissions_controller.rb:61:in `create'
  haml (2.2.20) rails/./lib/sass/plugin/rails.rb:20:in `process'
  sinatra (0.9.4) lib/sinatra/base.rb:413:in `forward'
  sinatra (0.9.4) lib/sinatra/base.rb:484:in `route_missing'
  sinatra (0.9.4) lib/sinatra/base.rb:469:in `route!'
  sinatra (0.9.4) lib/sinatra/base.rb:555:in `dispatch!'

...

Again, I only get this when i try to submit for a second time. It
obviously complains that it can't subscribe to the same queue because
it's already subscribed from the first submit.  I don't have this
issue when running from mongrel, only passenger.  Any ideas what this
could be??

workitem_listener:62 shows the code that subscribes to the queue.
AND,  here is how I'm calling it in my rails model:


models/submission.rb:

  def submit_job

    RuoteAMQP::WorkitemListener.new(RuoteKit.engine)
    wfid = RuoteKit.engine.launch(self.process_definition)

  end


Am I mis-using the listener here?

Thanks,
Dave



-- 
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

Reply via email to