Class: Delayed::JobGroups::CompleteStuckJobGroupsJob

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/job_groups/complete_stuck_job_groups_job.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.enqueue(**kwargs) ⇒ Object



7
8
9
# File 'lib/delayed/job_groups/complete_stuck_job_groups_job.rb', line 7

def enqueue(**kwargs)
  Delayed::Job.enqueue(new, **kwargs)
end

Instance Method Details

#performObject



12
13
14
15
16
# File 'lib/delayed/job_groups/complete_stuck_job_groups_job.rb', line 12

def perform
  Delayed::JobGroups::JobGroup.ready.with_no_open_jobs.find_each do |job_group|
    job_group.check_for_completion(skip_pending_jobs_check: true)
  end
end