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
4fa30b78
Commit
4fa30b78
authored
Mar 26, 2013
by
antirez
Browse files
redis-trib: ClusterNode #info_string output modified.
The hope is that the new one is more readable.
parent
df69155e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis-trib.rb
View file @
4fa30b78
...
@@ -217,7 +217,10 @@ class ClusterNode
...
@@ -217,7 +217,10 @@ class ClusterNode
x
.
count
==
1
?
x
.
first
.
to_s
:
"
#{
x
.
first
}
-
#{
x
.
last
}
"
x
.
count
==
1
?
x
.
first
.
to_s
:
"
#{
x
.
first
}
-
#{
x
.
last
}
"
}.
join
(
","
)
}.
join
(
","
)
"[
#{
@info
[
:cluster_state
].
upcase
}
#{
(
self
.
info
[
:flags
]
-
[
"myself"
]).
join
(
","
)
}
]
#{
self
.
info
[
:name
]
}
#{
self
.
to_s
}
slots:
#{
slots
}
(
#{
self
.
slots
.
length
}
slots)"
role
=
self
.
has_flag?
(
"master"
)
?
"M"
:
"S"
"
#{
role
}
:
#{
self
.
info
[
:name
]
}
#{
self
.
to_s
}
\n
"
+
" slots:
#{
slots
}
(
#{
self
.
slots
.
length
}
slots) "
+
"
#{
(
self
.
info
[
:flags
]
-
[
"myself"
]).
join
(
","
)
}
"
end
end
# Return a single string representing nodes and associated slots.
# Return a single string representing nodes and associated slots.
...
...
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