Skip to content
Michael J. Giarlo edited this page Jun 25, 2020 · 5 revisions

Welcome to the common-accessioning wiki!

Find Runaway Jobs

This is code we used find jobs that were proliferating (they were all related to the desc-md step in the accessionWF)

druids = []
problematic_druids = []
Resque.redis.lrange("queue:accessionWF_default",0,-1).each do |job|
  job = Resque::Job.decode(job)
  druid = job['args'].first
  job_class = job['class']
  next unless job_class == "Robots::DorRepo::Accession::DescriptiveMetadata"
  problematic_druids << druid if druids.include?(druid)
  druids << druid
end

Destroy Jobs (by class and by args)

Resque::Job.destroy('accessionWF_default', 'Robots::DorRepo::Accession::DescriptiveMetadata', "druid:md898kw3185") # destroy all descMD jobs for a given druid in a named queue
Resque::Job.destroy('accessionWF_default', 'Robots::DorRepo::Accession::DescriptiveMetadata') # destroy all descMD jobs in the named queue
Clone this wiki locally