class Qmin::Resque::BackgroundCallJob

Public Class Methods

new(klass, method_name, id) click to toggle source
# File lib/qmin/resque/background_call_job.rb, line 12
def initialize(klass, method_name, id)
  begin
    @klass = klass.is_a?(Class) ? klass : klass.constantize
    @method_name = method_name
    @id = id
  rescue => e
    ::Qmin::Qmin.current.report(e)
  end
end
perform(*args) click to toggle source
# File lib/qmin/resque/background_call_job.rb, line 4
def self.perform(*args)
  begin
    new(*args).perform
  rescue => e
    ::Qmin::Qmin.current.report(e)
  end
end

Public Instance Methods

perform() click to toggle source
# File lib/qmin/resque/background_call_job.rb, line 22
def perform
  begin
    instance = @klass.find(@id)
    instance.send(::Qmin.method_name_for_instance(instance, @method_name))
  rescue => e
    ::Qmin::Qmin.current.report(e)
  end
end