BigW Consortium Gitlab

Commit 923eb89c by Dmitriy Zaporozhets

Merge pull request #1528 from tsigo/resque_init

Consolidate Resque-related initializers
parents ad3eefdc 6ddbee5d
# Custom Redis configuration
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
config_file = File.join(rails_root, 'config', 'resque.yml')
if File.exists?(config_file)
resque_config = YAML.load_file(config_file)
Resque.redis = resque_config[rails_env]
end
# Queues
Resque.watch_queue(PostReceive.instance_variable_get("@queue"))
# Authentication
require 'resque/server'
class Authentication
def initialize(app)
......@@ -11,4 +25,7 @@ class Authentication
end
end
Resque::Server.use Authentication
\ No newline at end of file
Resque::Server.use Authentication
# Mailer
Resque::Mailer.excluded_environments = []
Resque.watch_queue(PostReceive.instance_variable_get("@queue"))
rails_root = ENV['RAILS_ROOT'] || File.dirname(__FILE__) + '/../..'
rails_env = ENV['RAILS_ENV'] || 'development'
config_file = File.join(rails_root, 'config', 'resque.yml')
if File.exists?(config_file)
resque_config = YAML.load_file(config_file)
Resque.redis = resque_config[rails_env]
end
Resque::Mailer.excluded_environments = []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment