Created
January 29, 2018 19:55
-
-
Save brunopedroso/a7fc4f269f2bd65afd149f146aa22f52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== limpar resque | |
Resque::Failure.count | |
a = Resque::Failure.all(0,50); nil | |
lista = [] | |
a.each_with_index do |x,i| | |
if x['payload']['args'].first['queue_name'] == 'salary_stub_load_job' | |
lista << i | |
end | |
end | |
lista.sort.revert.each {|i| Resque::Failure.remove(i)} | |
# pegar a lista de argumetnos dos falhos: | |
a.map {|el| el['payload']['args'].first['arguments'].first.slice("cpf", "deal_id", "person_id")} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment