Module: Sidekiq::Worker

Defined in:
lib/rekiq/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#estimated_next_work_timeObject

Returns the value of attribute estimated_next_work_time.



70
71
72
# File 'lib/rekiq/worker.rb', line 70

def estimated_next_work_time
  @estimated_next_work_time
end

#scheduled_work_timeObject

Returns the value of attribute scheduled_work_time.



70
71
72
# File 'lib/rekiq/worker.rb', line 70

def scheduled_work_time
  @scheduled_work_time
end

Instance Method Details

#cancel_rekiq_worker?(*method_args) ⇒ Boolean

Returns:

  • (Boolean)


79
80
81
82
83
84
85
86
87
# File 'lib/rekiq/worker.rb', line 79

def cancel_rekiq_worker?(*method_args)
  method_name = self.class.get_sidekiq_options['rekiq_cancel_method']

  !method_name.nil? and send(method_name, *method_args)
rescue StandardError => s
  raise ::Rekiq::CancelMethodInvocationError,
        "error while invoking rekiq_cancel_method: #{s.message}",
        s.backtrace
end