Sha256: d4599f30370d72a07e5c0f404c0f9dbc0f1931bd0d09f0ea64b764fc7ea4b631
Contents?: true
Size: 763 Bytes
Versions: 67
Compression:
Stored size: 763 Bytes
Contents
require "resque" module Ddr::Jobs module Job def self.extended(base) base.extend ClassMethods end module ClassMethods # @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. def queued_object_ids(**args) args[:type] = self __queue__.jobs(**args).map { |job| job["args"].first } end protected 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 def __queue__ Queue.new(queue) end end end end
Version data entries
67 entries across 67 versions & 1 rubygems