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 | 77 | gem "draper", "~> 0.18.0" |
78 | 78 | |
79 | 79 | # Background jobs |
80 | -gem "resque", "~> 1.23.0" | |
80 | +gem "resque", git: "https://github.com/defunkt/resque.git", ref: "9ef4700306dd946a3ac000612428967ce0c32213" | |
81 | 81 | gem 'resque_mailer' |
82 | 82 | |
83 | 83 | # HTTP requests | ... | ... |
Gemfile.lock
... | ... | @@ -14,6 +14,17 @@ GIT |
14 | 14 | rake (>= 0.8.7) |
15 | 15 | |
16 | 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 | 28 | remote: https://github.com/gitlabhq/grack.git |
18 | 29 | revision: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 |
19 | 30 | ref: ba46f3b0845c6a09d488ae6abdce6ede37e227e8 |
... | ... | @@ -315,7 +326,7 @@ GEM |
315 | 326 | rack (>= 1.1.3) |
316 | 327 | rack-mount (0.8.3) |
317 | 328 | rack (>= 1.0.0) |
318 | - rack-protection (1.2.0) | |
329 | + rack-protection (1.3.2) | |
319 | 330 | rack |
320 | 331 | rack-ssl (1.3.2) |
321 | 332 | rack |
... | ... | @@ -351,11 +362,6 @@ GEM |
351 | 362 | redis (3.0.2) |
352 | 363 | redis-namespace (1.2.1) |
353 | 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 | 365 | resque_mailer (2.1.0) |
360 | 366 | actionmailer (~> 3.0) |
361 | 367 | resque_spec (0.12.5) |
... | ... | @@ -512,7 +518,7 @@ DEPENDENCIES |
512 | 518 | rb-fsevent |
513 | 519 | rb-inotify |
514 | 520 | redcarpet (~> 2.2.2) |
515 | - resque (~> 1.23.0) | |
521 | + resque! | |
516 | 522 | resque_mailer |
517 | 523 | resque_spec |
518 | 524 | rspec-rails | ... | ... |
config/initializers/4_resque.rb
... | ... | @@ -6,12 +6,11 @@ if File.exists?(config_file) |
6 | 6 | Resque.redis = resque_config[Rails.env] |
7 | 7 | end |
8 | 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 | 11 | # Authentication |
13 | 12 | require 'resque/server' |
14 | -class Authentication | |
13 | +class ResqueAuthentication | |
15 | 14 | def initialize(app) |
16 | 15 | @app = app |
17 | 16 | end |
... | ... | @@ -23,9 +22,8 @@ class Authentication |
23 | 22 | end |
24 | 23 | end |
25 | 24 | |
26 | -Resque::Server.use Authentication | |
25 | +Resque::Server.use ResqueAuthentication | |
27 | 26 | |
28 | 27 | # Mailer |
29 | 28 | Resque::Mailer.excluded_environments = [] |
30 | 29 | |
31 | -Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection } | ... | ... |