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
9cf9e6f1
Commit
9cf9e6f1
authored
May 14, 2010
by
Pieter Noordhuis
Browse files
proc to retrieve values from INFO properties
parent
4d16bb25
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/support/util.tcl
View file @
9cf9e6f1
...
...
@@ -25,10 +25,16 @@ proc zlistAlikeSort {a b} {
string compare
[
lindex $a 1
]
[
lindex $b 1
]
}
# Return value for INFO property
proc status
{
r property
}
{
if
{[
regexp
"
\r\n
$property:
(.*?)
\r\n
"
[
$r
info
]
_ value
]}
{
set _ $value
}
}
proc waitForBgsave r
{
while 1
{
set i
[
$r
info
]
if
{[
string match
{
*bgsave_in_progress:1*
}
$i
]}
{
if
{[
status r bgsave_in_progress
]
eq 1
}
{
puts -nonewline
"
\n
Waiting for background save to finish... "
flush stdout
after 1000
...
...
@@ -40,8 +46,7 @@ proc waitForBgsave r {
proc waitForBgrewriteaof r
{
while 1
{
set i
[
$r
info
]
if
{[
string match
{
*bgrewriteaof_in_progress:1*
}
$i
]}
{
if
{[
status r bgrewriteaof_in_progress
]
eq 1
}
{
puts -nonewline
"
\n
Waiting for background AOF rewrite to finish... "
flush stdout
after 1000
...
...
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