Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ares/199298e357013c7533aa to your computer and use it in GitHub Desktop.
Save ares/199298e357013c7533aa to your computer and use it in GitHub Desktop.
Resume all paused tasks in error states that are resumable
ForemanTasks::Task.where(:state => :paused, :result => :error).all.select(&:resumable?).each {|t| ForemanTasks.dynflow.world.execute(t.execution_plan.id)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment