Module: Delayed::Job::Extras::InstanceMethods

Defined in:
lib/delayed_job_extras/extras.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#__original_argsObject

Returns the value of attribute __original_args.



18
19
20
# File 'lib/delayed_job_extras/extras.rb', line 18

def __original_args
  @__original_args
end

#__re_enqueue_blockObject

Returns the value of attribute __re_enqueue_block.



19
20
21
# File 'lib/delayed_job_extras/extras.rb', line 19

def __re_enqueue_block
  @__re_enqueue_block
end

#idObject

Returns the value of attribute id.



21
22
23
# File 'lib/delayed_job_extras/extras.rb', line 21

def id
  @id
end

#loggerObject

Returns the value of attribute logger.



16
17
18
# File 'lib/delayed_job_extras/extras.rb', line 16

def logger
  @logger
end

#priorityObject

Returns the value of attribute priority.



15
16
17
# File 'lib/delayed_job_extras/extras.rb', line 15

def priority
  @priority
end

#re_enqueuableObject

Returns the value of attribute re_enqueuable.



20
21
22
# File 'lib/delayed_job_extras/extras.rb', line 20

def re_enqueuable
  @re_enqueuable
end

#run_atObject

Returns the value of attribute run_at.



14
15
16
# File 'lib/delayed_job_extras/extras.rb', line 14

def run_at
  @run_at
end

#worker_class_nameObject

Returns the value of attribute worker_class_name.



17
18
19
# File 'lib/delayed_job_extras/extras.rb', line 17

def worker_class_name
  @worker_class_name
end

Instance Method Details

#cloneObject



60
61
62
63
64
# File 'lib/delayed_job_extras/extras.rb', line 60

def clone
  cl = super
  cl.run_at = nil
  cl
end

#dj_objectObject



70
71
72
# File 'lib/delayed_job_extras/extras.rb', line 70

def dj_object
  Delayed::Job.find(@dj_object)
end

#dj_object=(dj) ⇒ Object



66
67
68
# File 'lib/delayed_job_extras/extras.rb', line 66

def dj_object=(dj)
  @dj_object = dj.id
end

#enqueue(priority = self.priority, run_at = self.run_at) ⇒ Object Also known as: save



50
51
52
# File 'lib/delayed_job_extras/extras.rb', line 50

def enqueue(priority = self.priority, run_at = self.run_at)
  Delayed::Job.enqueue(self, priority, run_at)
end

#unique?Boolean

Returns:

  • (Boolean)


56
57
58
# File 'lib/delayed_job_extras/extras.rb', line 56

def unique?
  false
end