Module: Jiggler::Job

Defined in:
lib/jiggler/job.rb

Defined Under Namespace

Modules: ClassMethods Classes: Enqueuer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



100
101
102
# File 'lib/jiggler/job.rb', line 100

def self.included(base)
  base.extend(ClassMethods)
end

Instance Method Details

#enqueue(*args) ⇒ Object



104
105
106
# File 'lib/jiggler/job.rb', line 104

def enqueue(*args)
  Enqueuer.new(self.class).enqueue(*args)
end

#enqueue_in(seconds, *args) ⇒ Object



108
109
110
# File 'lib/jiggler/job.rb', line 108

def enqueue_in(seconds, *args)
  Enqueuer.new(self.class).enqueue_in(seconds, *args)
end

#perform(**args) ⇒ Object



112
113
114
# File 'lib/jiggler/job.rb', line 112

def perform(**args)
  raise "#{self.class} must implement 'perform' method"
end