Skip to content

Instantly share code, notes, and snippets.

@pivotalneutron
Created May 27, 2011 03:32
Show Gist options
  • Save pivotalneutron/994591 to your computer and use it in GitHub Desktop.
Save pivotalneutron/994591 to your computer and use it in GitHub Desktop.
Extracting failed IDs from migration jobs and requeueing them
Resque::Failure.all(28044, Resque::Failure.count - 28044).each do |j|
next unless j["retried_at"].nil?
e = j["error"]
ids = e[(e.index('[')+1)...e.index(']')].split(', ').map(&:to_i)
Jobs::MigrateLegacyUsers.submit_job(ids)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment