Class: Qwirk::Adapter::InMemory::Publisher::MyTaskConsumer
- Inherits:
-
Object
- Object
- Qwirk::Adapter::InMemory::Publisher::MyTaskConsumer
- Defined in:
- lib/qwirk/adapter/in_memory/publisher.rb
Instance Attribute Summary collapse
-
#stopped ⇒ Object
readonly
Returns the value of attribute stopped.
Instance Method Summary collapse
- #acknowledge_message ⇒ Object
-
#initialize(producer_queue, consumer_queue) ⇒ MyTaskConsumer
constructor
A new instance of MyTaskConsumer.
- #receive ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(producer_queue, consumer_queue) ⇒ MyTaskConsumer
Returns a new instance of MyTaskConsumer.
72 73 74 75 76 |
# File 'lib/qwirk/adapter/in_memory/publisher.rb', line 72 def initialize(producer_queue, consumer_queue) @producer_queue = producer_queue @consumer_queue = consumer_queue @stopped = false end |
Instance Attribute Details
#stopped ⇒ Object (readonly)
Returns the value of attribute stopped.
70 71 72 |
# File 'lib/qwirk/adapter/in_memory/publisher.rb', line 70 def stopped @stopped end |
Instance Method Details
#acknowledge_message ⇒ Object
84 85 |
# File 'lib/qwirk/adapter/in_memory/publisher.rb', line 84 def end |
#receive ⇒ Object
78 79 80 81 82 |
# File 'lib/qwirk/adapter/in_memory/publisher.rb', line 78 def receive , response, worker_name = @consumer_queue.read(self) return nil unless response return [, response] end |