Class: CanvasSync::JobUniqueness::Compat::ActiveJob::ActiveJobLockContext

Inherits:
LockContext
  • Object
show all
Defined in:
lib/canvas_sync/job_uniqueness/compat/active_job.rb

Instance Method Summary collapse

Methods inherited from LockContext

#base_key, #cache_data, #config, #debug_data, from_serialized, #handle_lifecycle!, #initialize, #job_class, #job_id, #job_queue, #job_score, #lock_id, #lock_id=, #lock_strategy, #serialize

Constructor Details

This class inherits a constructor from CanvasSync::JobUniqueness::LockContext

Instance Method Details

#job_scheduled_atObject



7
8
9
# File 'lib/canvas_sync/job_uniqueness/compat/active_job.rb', line 7

def job_scheduled_at
  job_instance&.scheduled_at
end

#reenqueue(schedule_in:) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/canvas_sync/job_uniqueness/compat/active_job.rb', line 11

def reenqueue(schedule_in:)
  job_class.set(
    queue: job_queue.to_sym,
    wait: schedule_in,
    priortity: job_instance.priority,
  ).perform_later(*job_instance.arguments)
end