Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d7021b08
Commit
d7021b08
authored
Sep 29, 2011
by
antirez
Browse files
redis-trib: added cluster state to node info string
parent
92dd76c8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
d7021b08
...
...
@@ -99,6 +99,7 @@ class ClusterNode
@r
.
cluster
(
"info"
).
split
(
"
\n
"
).
each
{
|
e
|
k
,
v
=
e
.
split
(
":"
)
k
=
k
.
to_sym
v
.
chop!
if
k
!=
:cluster_state
@info
[
k
]
=
v
.
to_i
else
...
...
@@ -163,7 +164,7 @@ class ClusterNode
x
.
count
==
1
?
x
.
first
.
to_s
:
"
#{
x
.
first
}
-
#{
x
.
last
}
"
}.
join
(
","
)
"
#{
self
.
to_s
.
ljust
(
25
)
}
slots:
#{
slots
}
"
"
[
#{
@info
[
:cluster_state
].
upcase
}
]
#{
self
.
to_s
.
ljust
(
25
)
}
slots:
#{
slots
}
"
end
def
info
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment