Class: Roundhouse::RoundRobinFetch::UnitOfWork
- Inherits:
-
Struct
- Object
- Struct
- Roundhouse::RoundRobinFetch::UnitOfWork
- Defined in:
- lib/roundhouse/fetch.rb
Constant Summary collapse
- QUEUE_REGEX =
/.*#{Roundhouse::Monitor::QUEUE}:/.freeze
Instance Attribute Summary collapse
-
#full_queue_name ⇒ Object
Returns the value of attribute full_queue_name.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
Instance Attribute Details
#full_queue_name ⇒ Object
Returns the value of attribute full_queue_name
136 137 138 |
# File 'lib/roundhouse/fetch.rb', line 136 def full_queue_name @full_queue_name end |
#message ⇒ Object
Returns the value of attribute message
136 137 138 |
# File 'lib/roundhouse/fetch.rb', line 136 def @message end |
Instance Method Details
#acknowledge ⇒ Object
139 140 141 |
# File 'lib/roundhouse/fetch.rb', line 139 def acknowledge # nothing to do end |
#queue_id ⇒ Object
143 144 145 |
# File 'lib/roundhouse/fetch.rb', line 143 def queue_id full_queue_name.gsub(QUEUE_REGEX, '') end |
#requeue ⇒ Object
147 148 149 150 151 152 |
# File 'lib/roundhouse/fetch.rb', line 147 def requeue Roundhouse.redis do |conn| Roundhouse::Monitor.requeue(conn, queue_id, ) Roundhouse::Monitor.push(conn, queue_id) end end |