resque-heartbeat 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -37,19 +37,22 @@ module Resque
37
37
  end
38
38
 
39
39
  def redis
40
- @redis && connected? ? @redis : @redis = connect
40
+ Resque.redis
41
+ # @redis && connected? ? @redis : @redis = connect
41
42
  end
42
43
 
43
- def connect
44
- # apparently the Redis connection is not thread-safe, so we connect another instance
45
- # see https://github.com/ezmobius/redis-rb/issues#issue/75
46
- redis = Redis.connect(:url => ENV['REDIS_URL']).tap { |redis| redis.client.connect }
47
- Redis::Namespace.new(:resque, :redis => redis)
48
- end
44
+ # def connect
45
+ # # apparently the Redis connection is not thread-safe, so we connect another instance
46
+ # # see https://github.com/ezmobius/redis-rb/issues#issue/75
47
+ # url = Resque.redis.instance_variable_get(:@redis).client.location
48
+ # redis = Redis.connect(:url => "redis://#{url}")
49
+ # redis.client.connect
50
+ # Redis::Namespace.new(:resque, :redis => redis)
51
+ # end
49
52
 
50
- def connected?
51
- @redis.client.connected?
52
- end
53
+ # def connected?
54
+ # @redis.client.connected?
55
+ # end
53
56
 
54
57
  def beat!
55
58
  redis.sadd(:workers, worker)
@@ -1,3 +1,3 @@
1
1
  module ResqueHeartbeat
2
- VERSION = "0.0.2"
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-heartbeat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,9 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-06-11 00:00:00.000000000 +02:00
13
- default_executable:
14
- dependencies: []
12
+ date: 2011-08-30 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: resque
16
+ requirement: &70353716151560 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.17.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70353716151560
15
25
  description: ! '[description]'
16
26
  email: svenfuchs@artweb-design.de
17
27
  executables: []
@@ -21,7 +31,6 @@ files:
21
31
  - lib/resque/heartbeat.rb
22
32
  - lib/resque_heartbeat.rb
23
33
  - lib/resque_heartbeat/version.rb
24
- has_rdoc: true
25
34
  homepage: http://github.com/svenfuchs/resque-heartbeat
26
35
  licenses: []
27
36
  post_install_message:
@@ -42,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
51
  version: '0'
43
52
  requirements: []
44
53
  rubyforge_project: ! '[none]'
45
- rubygems_version: 1.6.2
54
+ rubygems_version: 1.8.6
46
55
  signing_key:
47
56
  specification_version: 3
48
57
  summary: ! '[summary]'