Class: Falqon::Strategies::None
- Inherits:
-
Falqon::Strategy
- Object
- Falqon::Strategy
- Falqon::Strategies::None
- Defined in:
- lib/falqon/strategies/none.rb
Overview
Retry strategy that does not retry
When a message fails to process, it is immediately marked as dead and moved to the dead subqueue.
Instance Method Summary collapse
Instance Method Details
#retry(message, error) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/falqon/strategies/none.rb', line 21 def retry(, error) queue.redis.with do |r| r.multi do |t| # Set error metadata t.hset( "#{queue.id}:metadata:#{.id}", :retried_at, Time.now.to_i, :retry_error, error., ) # Kill message immediately .kill # Remove identifier from processing queue queue.processing.remove(.id) # Set message status t.hset("#{queue.id}:metadata:#{.id}", :status, "dead") end end end |