Skip to content

Instantly share code, notes, and snippets.

@wmene
Created December 2, 2014 19:51
Show Gist options
  • Save wmene/47b198ff88461a7ae33b to your computer and use it in GitHub Desktop.
Save wmene/47b198ff88461a7ae33b to your computer and use it in GitHub Desktop.
def monitor_stale(flags = {})
stale = Dor::WorkflowService.get_stale_queued_workflows('sdr', hours_ago: 24, limit: 1000)
pp stale
stale.each do |h|
h[:repo] = 'sdr'
ap({:h => h}) if flags[:debug]
Dor::WorkflowService.update_workflow_status(h[:repo], h[:druid], h[:workflow], h[:step], 'waiting', expected: 'queued')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment