nutcracker 0.2.4.6 → 0.2.4.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nutcracker.rb +8 -2
- data/lib/nutcracker/version.rb +1 -1
- metadata +3 -3
data/lib/nutcracker.rb
CHANGED
@@ -109,8 +109,9 @@ module Nutcracker
|
|
109
109
|
# Adding cluster Node
|
110
110
|
if node_value.kind_of? Hash
|
111
111
|
url = ( node =~ /redis\:\/\// ) ? node : "redis://#{node}"
|
112
|
+
info = redis_info(url)
|
112
113
|
cluster[:nodes] << {
|
113
|
-
server_url: url, info:
|
114
|
+
server_url: url, info: info, running: info.any?
|
114
115
|
}.merge(cluster_data[node])
|
115
116
|
else # Cluster attribute
|
116
117
|
cluster[node] = node_value
|
@@ -127,7 +128,12 @@ module Nutcracker
|
|
127
128
|
end
|
128
129
|
|
129
130
|
def redis_info url
|
130
|
-
|
131
|
+
begin
|
132
|
+
redis = Redis.connect(url: url)
|
133
|
+
rescue
|
134
|
+
return Hash.new
|
135
|
+
end
|
136
|
+
|
131
137
|
info = redis.info
|
132
138
|
db_size = redis.dbsize
|
133
139
|
max_memory = redis.config(:get, 'maxmemory')['maxmemory'].to_i
|
data/lib/nutcracker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nutcracker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.4.
|
4
|
+
version: 0.2.4.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -236,7 +236,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
236
|
version: '0'
|
237
237
|
segments:
|
238
238
|
- 0
|
239
|
-
hash:
|
239
|
+
hash: 1477241173229409876
|
240
240
|
requirements: []
|
241
241
|
rubyforge_project: ruby-nutcracker
|
242
242
|
rubygems_version: 1.8.25
|