scotttam-resque 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,11 @@ module Resque
6
6
  Resque.redis
7
7
  end
8
8
 
9
+ #Direct access to the before_fork proc
10
+ def before_fork
11
+ Resque.before_fork
12
+ end
13
+
9
14
  # Given a Ruby object, returns a string suitable for storage in a
10
15
  # queue.
11
16
  def encode(object)
@@ -1,3 +1,3 @@
1
1
  module Resque
2
- Version = '0.0.1'
2
+ Version = '0.0.2'
3
3
  end
data/lib/resque/worker.rb CHANGED
@@ -207,7 +207,7 @@ module Resque
207
207
  enable_gc_optimizations
208
208
  register_signal_handlers
209
209
  prune_dead_workers
210
- before_fork
210
+ call_before_fork
211
211
  register_worker
212
212
  end
213
213
 
@@ -313,8 +313,8 @@ module Resque
313
313
  end
314
314
 
315
315
  #Call any before_fork procs, if any
316
- def before_fork
317
- @@before_fork.call if Worker.class_variable_defined?(:@@before_fork)
316
+ def call_before_fork
317
+ before_fork.call if before_fork
318
318
  end
319
319
 
320
320
  # Unregisters ourself as a worker. Useful when shutting down.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scotttam-resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath, Scott Tamosunas