Created
October 25, 2017 14:25
-
-
Save sauloperez/fe464cf3505b6e24d566196803ff7c16 to your computer and use it in GitHub Desktop.
Snippets to check Delayed Job data
This file contains 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
# Failed | |
Delayed::Job.where('failed_at IS NOT NULL') | |
# Active | |
Delayed::Job.where('failed_at IS NULL AND locked_by IS NOT NULL') | |
# Queued | |
Delayed::Job.where('failed_at IS NULL AND locked_by IS NULL') | |
# Destroy | |
Delayed::Job.find(id).destroy | |
# Retry | |
dj = Delayed::Job.find(id) | |
dj.update_attribute :failed_at, nil if dj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment