Class: Delayed::PerformableMethod

Inherits:
Object
  • Object
show all
Includes:
HoptoadNotifier::Catcher
Defined in:
lib/delayed_job_extras/performable_method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#worker_class_nameObject

Returns the value of attribute worker_class_name.



4
5
6
# File 'lib/delayed_job_extras/performable_method.rb', line 4

def worker_class_name
  @worker_class_name
end

Instance Method Details

#initialize_with_worker_class_name(object, method, args) ⇒ Object



6
7
8
9
# File 'lib/delayed_job_extras/performable_method.rb', line 6

def initialize_with_worker_class_name(object, method, args)
  self.worker_class_name = "#{object.class}__#{method}".underscore
  initialize_without_worker_class_name(object, method, args)
end

#perform_with_hoptoadObject



16
17
18
19
20
21
22
23
# File 'lib/delayed_job_extras/performable_method.rb', line 16

def perform_with_hoptoad
  begin
    perform_without_hoptoad
  rescue Exception => e
    notify_hoptoad(e)
    raise e
  end
end