On Mon, May 03, 2010 at 08:22:38AM -0700, threetee wrote:
> Thanks for the reply. Unfortunately, this behavior is still occurring:
> 
> ----------
> $ ruby ruote-amqp_test.rb
> {:timeout=>nil, :pass=>"guest", :user=>"guest", :vhost=>"/", :ssl=>false, 
> :host=>"127.0.0.1", :logging=>false, :port=>5672}
> /Library/Ruby/Gems/1.8/gems/ruote-2.1.10/lib/ruote/receiver/base.rb:
> 47:in `reply': undefined method `storage' for nil:NilClass
> (NoMethodError)

Hello,

The initializer for ruote-amqp's listener looks like

---8<---
    def initialize( engine_or_storage, queue = nil )

      @storage = engine_or_storage.respond_to?( :storage ) ? 
engine_or_storage.storage : engine_or_storage

      self.class.queue = queue if queue

      RuoteAMQP.start!

      MQ.queue( self.class.queue, :durable => true ).subscribe do |message|
        if AMQP.closing?
          # Do nothing, we're going down
        else
          workitem = decode_workitem( message )
          reply( workitem )
        end
      end
    end
--->8---

should be replaced with

---8<---
    def initialize( engine_or_storage, queue = nil )

      super( engine_or_storage )

      self.class.queue = queue if queue

      RuoteAMQP.start!

      MQ.queue( self.class.queue, :durable => true ).subscribe do |message|
        if AMQP.closing?
          # Do nothing, we're going down
        else
          workitem = decode_workitem( message )
          reply( workitem )
        end
      end
    end
--->8---

That makes a patch for Kenneth.

Tell me how it goes.


My best regards,

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

Reply via email to