Module: QueueBus::Adapters::Resque::RetryHandlers

Defined in:
lib/resque_bus/adapter.rb

Instance Method Summary collapse

Instance Method Details

#on_failure_aaa(exception, *args) ⇒ Object



52
53
54
55
56
57
# File 'lib/resque_bus/adapter.rb', line 52

def on_failure_aaa(exception, *args)
  # note: sorted alphabetically
  # queue needs to be set for rety to work (know what queue in Requeue.class_to_queue)
  hash = ::QueueBus::Util.decode(args[0])
  @my_queue = hash["bus_rider_queue"]
end

#on_failure_zzz(exception, *args) ⇒ Object



59
60
61
62
# File 'lib/resque_bus/adapter.rb', line 59

def on_failure_zzz(exception, *args)
  # note: sorted alphabetically
  @my_queue = nil
end

#queueObject

to prevent running twice



48
49
50
# File 'lib/resque_bus/adapter.rb', line 48

def queue
  @my_queue
end