Last active
October 24, 2018 13:32
-
-
Save danhodge/a8f44ea7296b9731b51743aa49b897d8 to your computer and use it in GitHub Desktop.
Resque Basics
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
# Add following to enable debug logging of Resque internals | |
Resque.logger = Logger.new(STDOUT) | |
Resque.logger.level = Logger::DEBUG | |
# Use resque-retry plugin for automatic retries | |
class SomeJob | |
extend Resque::Plugins::Retry | |
end | |
# The scheduler process must be running to perform retries - if not running, the job | |
# will run and fail and be rescheduled but never be retried | |
# Stop using inline scheduler to do realistic testing in development | |
# Comment out this line: | |
Resque.inline = Rails.env == 'development' || Rails.env == 'test' | |
# Redis snapshots are periodically written to the file /usr/local/var/db/redis/dump.rdb, | |
# restart Redis after deleting that file to clear out any unwanted state | |
# Look at all failed jobs | |
Resque::Failure.all(0, Resque::Failure.count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment