module Ddr::Jobs::Job::ClassMethods
Public Instance Methods
queued_object_ids(**args)
click to toggle source
@return [Array<String>] list of object ids queued for this job type. @note Assumes that the object_id is the first argument of the .perform method.
# File lib/ddr/jobs/job.rb, line 13 def queued_object_ids(**args) args[:type] = self __queue__.jobs(**args).map { |job| job["args"].first } end
Protected Instance Methods
method_missing(name, *args, &block)
click to toggle source
Calls superclass method
# File lib/ddr/jobs/job.rb, line 20 def method_missing(name, *args, &block) # If .queue method not defined, do the right thing if name == :queue return Resque.queue_from_class(self) end super end
Private Instance Methods
__queue__()
click to toggle source
# File lib/ddr/jobs/job.rb, line 30 def __queue__ Queue.new(queue) end