Exception: Amigo::Retry::Die

Inherits:
Error
  • Object
show all
Defined in:
lib/amigo/retry.rb

Overview

Raise this class, or a subclass of it, to send the job to the DeadSet, rather than going through Sidekiq’s retry mechanisms. This allows jobs to hard-fail when there is something like a total outage, rather than retrying.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil) ⇒ Die

Returns a new instance of Die.



53
54
55
56
# File 'lib/amigo/retry.rb', line 53

def initialize(msg=nil)
  @wrapped = exc?(msg)
  super(exc_or_msg("kill job", msg))
end

Instance Attribute Details

#wrappedObject

Returns the value of attribute wrapped.



51
52
53
# File 'lib/amigo/retry.rb', line 51

def wrapped
  @wrapped
end