Commit 3c1022f9b118f004c421f212e55acbe1d4ff3954
1 parent
64db738f
Exists in
master
and in
4 other branches
No resque errors
Showing
3 changed files
with
17 additions
and
13 deletions
Show diff stats
Gemfile
@@ -77,7 +77,7 @@ gem "acts-as-taggable-on", "2.3.3" | @@ -77,7 +77,7 @@ gem "acts-as-taggable-on", "2.3.3" | ||
77 | gem "draper", "~> 0.18.0" | 77 | gem "draper", "~> 0.18.0" |
78 | 78 | ||
79 | # Background jobs | 79 | # Background jobs |
80 | -gem "resque", "~> 1.23.0" | 80 | +gem "resque", git: "https://github.com/defunkt/resque.git", ref: "9ef4700306dd946a3ac000612428967ce0c32213" |
81 | gem 'resque_mailer' | 81 | gem 'resque_mailer' |
82 | 82 | ||
83 | # HTTP requests | 83 | # HTTP requests |
Gemfile.lock
@@ -14,6 +14,17 @@ GIT | @@ -14,6 +14,17 @@ GIT | ||
14 | rake (>= 0.8.7) | 14 | rake (>= 0.8.7) |
15 | 15 | ||
16 | GIT | 16 | GIT |
17 | + remote: https://github.com/defunkt/resque.git | ||
18 | + revision: 9ef4700306dd946a3ac000612428967ce0c32213 | ||
19 | + ref: 9ef4700306dd946a3ac000612428967ce0c32213 | ||
20 | + specs: | ||
21 | + resque (2.0.0.pre.1) | ||
22 | + json | ||
23 | + redis-namespace (~> 1.0) | ||
24 | + sinatra (>= 0.9.2) | ||
25 | + vegas (~> 0.1.2) | ||
26 | + | ||
27 | +GIT | ||
17 | remote: https://github.com/gitlabhq/grack.git | 28 | remote: https://github.com/gitlabhq/grack.git |
18 | revision: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 | 29 | revision: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 |
19 | ref: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 | 30 | ref: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 |
@@ -315,7 +326,7 @@ GEM | @@ -315,7 +326,7 @@ GEM | ||
315 | rack (>= 1.1.3) | 326 | rack (>= 1.1.3) |
316 | rack-mount (0.8.3) | 327 | rack-mount (0.8.3) |
317 | rack (>= 1.0.0) | 328 | rack (>= 1.0.0) |
318 | - rack-protection (1.2.0) | 329 | + rack-protection (1.3.2) |
319 | rack | 330 | rack |
320 | rack-ssl (1.3.2) | 331 | rack-ssl (1.3.2) |
321 | rack | 332 | rack |
@@ -351,11 +362,6 @@ GEM | @@ -351,11 +362,6 @@ GEM | ||
351 | redis (3.0.2) | 362 | redis (3.0.2) |
352 | redis-namespace (1.2.1) | 363 | redis-namespace (1.2.1) |
353 | redis (~> 3.0.0) | 364 | redis (~> 3.0.0) |
354 | - resque (1.23.0) | ||
355 | - multi_json (~> 1.0) | ||
356 | - redis-namespace (~> 1.0) | ||
357 | - sinatra (>= 0.9.2) | ||
358 | - vegas (~> 0.1.2) | ||
359 | resque_mailer (2.1.0) | 365 | resque_mailer (2.1.0) |
360 | actionmailer (~> 3.0) | 366 | actionmailer (~> 3.0) |
361 | resque_spec (0.12.5) | 367 | resque_spec (0.12.5) |
@@ -512,7 +518,7 @@ DEPENDENCIES | @@ -512,7 +518,7 @@ DEPENDENCIES | ||
512 | rb-fsevent | 518 | rb-fsevent |
513 | rb-inotify | 519 | rb-inotify |
514 | redcarpet (~> 2.2.2) | 520 | redcarpet (~> 2.2.2) |
515 | - resque (~> 1.23.0) | 521 | + resque! |
516 | resque_mailer | 522 | resque_mailer |
517 | resque_spec | 523 | resque_spec |
518 | rspec-rails | 524 | rspec-rails |
config/initializers/4_resque.rb
@@ -6,12 +6,11 @@ if File.exists?(config_file) | @@ -6,12 +6,11 @@ if File.exists?(config_file) | ||
6 | Resque.redis = resque_config[Rails.env] | 6 | Resque.redis = resque_config[Rails.env] |
7 | end | 7 | end |
8 | Resque.redis.namespace = 'resque:gitlab' | 8 | Resque.redis.namespace = 'resque:gitlab' |
9 | -# Queues | ||
10 | -Resque.watch_queue(PostReceive.instance_variable_get("@queue")) | 9 | +Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } |
11 | 10 | ||
12 | # Authentication | 11 | # Authentication |
13 | require 'resque/server' | 12 | require 'resque/server' |
14 | -class Authentication | 13 | +class ResqueAuthentication |
15 | def initialize(app) | 14 | def initialize(app) |
16 | @app = app | 15 | @app = app |
17 | end | 16 | end |
@@ -23,9 +22,8 @@ class Authentication | @@ -23,9 +22,8 @@ class Authentication | ||
23 | end | 22 | end |
24 | end | 23 | end |
25 | 24 | ||
26 | -Resque::Server.use Authentication | 25 | +Resque::Server.use ResqueAuthentication |
27 | 26 | ||
28 | # Mailer | 27 | # Mailer |
29 | Resque::Mailer.excluded_environments = [] | 28 | Resque::Mailer.excluded_environments = [] |
30 | 29 | ||
31 | -Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } |