Class: ProxyService::Worker
- Inherits:
-
QueueWorker
- Object
- QueueWorker
- ProxyService::Worker
- Defined in:
- lib/proxy_service/worker.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#ready ⇒ Object
writeonly
Sets the attribute ready.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/proxy_service/worker.rb', line 5 def @message end |
#ready=(value) ⇒ Object (writeonly)
Sets the attribute ready
6 7 8 |
# File 'lib/proxy_service/worker.rb', line 6 def ready=(value) @ready = value end |
Class Method Details
.stomp ⇒ Object
8 9 10 |
# File 'lib/proxy_service/worker.rb', line 8 def self.stomp QueueWorker.stomp end |
Instance Method Details
#call(message) ⇒ Object
12 13 14 15 |
# File 'lib/proxy_service/worker.rb', line 12 def call() @message = @ready = true end |
#ready? ⇒ Boolean
17 18 19 |
# File 'lib/proxy_service/worker.rb', line 17 def ready? !!@ready end |
#release(proxy, is_blocked) ⇒ Object
21 22 23 24 25 26 |
# File 'lib/proxy_service/worker.rb', line 21 def release(proxy, is_blocked) ack() unsubscribe publish(proxy) unless is_blocked close end |