From 3c1022f9b118f004c421f212e55acbe1d4ff3954 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 25 Dec 2012 16:18:22 +0200 Subject: [PATCH] No resque errors --- Gemfile | 2 +- Gemfile.lock | 20 +++++++++++++------- config/initializers/4_resque.rb | 8 +++----- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/Gemfile b/Gemfile index 49fbcad..fec3dc8 100644 --- a/Gemfile +++ b/Gemfile @@ -77,7 +77,7 @@ gem "acts-as-taggable-on", "2.3.3" gem "draper", "~> 0.18.0" # Background jobs -gem "resque", "~> 1.23.0" +gem "resque", git: "https://github.com/defunkt/resque.git", ref: "9ef4700306dd946a3ac000612428967ce0c32213" gem 'resque_mailer' # HTTP requests diff --git a/Gemfile.lock b/Gemfile.lock index d8be14b..a086bb4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -14,6 +14,17 @@ GIT rake (>= 0.8.7) GIT + remote: https://github.com/defunkt/resque.git + revision: 9ef4700306dd946a3ac000612428967ce0c32213 + ref: 9ef4700306dd946a3ac000612428967ce0c32213 + specs: + resque (2.0.0.pre.1) + json + redis-namespace (~> 1.0) + sinatra (>= 0.9.2) + vegas (~> 0.1.2) + +GIT remote: https://github.com/gitlabhq/grack.git revision: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 ref: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 @@ -315,7 +326,7 @@ GEM rack (>= 1.1.3) rack-mount (0.8.3) rack (>= 1.0.0) - rack-protection (1.2.0) + rack-protection (1.3.2) rack rack-ssl (1.3.2) rack @@ -351,11 +362,6 @@ GEM redis (3.0.2) redis-namespace (1.2.1) redis (~> 3.0.0) - resque (1.23.0) - multi_json (~> 1.0) - redis-namespace (~> 1.0) - sinatra (>= 0.9.2) - vegas (~> 0.1.2) resque_mailer (2.1.0) actionmailer (~> 3.0) resque_spec (0.12.5) @@ -512,7 +518,7 @@ DEPENDENCIES rb-fsevent rb-inotify redcarpet (~> 2.2.2) - resque (~> 1.23.0) + resque! resque_mailer resque_spec rspec-rails diff --git a/config/initializers/4_resque.rb b/config/initializers/4_resque.rb index 03c2b78..ab34050 100644 --- a/config/initializers/4_resque.rb +++ b/config/initializers/4_resque.rb @@ -6,12 +6,11 @@ if File.exists?(config_file) Resque.redis = resque_config[Rails.env] end Resque.redis.namespace = 'resque:gitlab' -# Queues -Resque.watch_queue(PostReceive.instance_variable_get("@queue")) +Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } # Authentication require 'resque/server' -class Authentication +class ResqueAuthentication def initialize(app) @app = app end @@ -23,9 +22,8 @@ class Authentication end end -Resque::Server.use Authentication +Resque::Server.use ResqueAuthentication # Mailer Resque::Mailer.excluded_environments = [] -Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } -- libgit2 0.21.2