Created
January 22, 2013 03:39
-
-
Save activefx/4591868 to your computer and use it in GitHub Desktop.
resque initializer
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
# Require to rescue Resque::TermException errors in the perfrom method | |
require 'resque/errors' | |
# Load the servers to enable to web interfaces | |
require 'resque/server' | |
require 'resque_scheduler/server' | |
# Create a global variable to access the Redis DB | |
$redis = Rails.env == 'test' ? Redis.new : configatron.redis.server | |
# Tell Resque to use the defined Redis DB | |
Resque.redis = $redis |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment