Skip to content

Commit ff0b963

Browse files
committed
Less output for the sentinel example.
1 parent ce0e70d commit ff0b963

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/sentinel.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
(0..1000000).each{|i|
2323
begin
2424
r.set(i,i)
25-
puts i
25+
$stdout.write("SET (#{i} times)\n") if i % 100 == 0
2626
rescue => e
27-
puts "(#{i}) ERR: #{e}"
27+
$stdout.write("E")
2828
end
2929
sleep(0.01)
3030
}

examples/sentinel/start

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ end
1515
base = File.expand_path(File.dirname(__FILE__))
1616

1717
# Masters
18-
$pids << spawn("redis-server --port 6380")
19-
$pids << spawn("redis-server --port 6381")
18+
$pids << spawn("redis-server --port 6380 --loglevel warning")
19+
$pids << spawn("redis-server --port 6381 --loglevel warning")
2020

2121
# Slaves of Master 1
22-
$pids << spawn("redis-server --port 63800 --slaveof 127.0.0.1 6380")
23-
$pids << spawn("redis-server --port 63801 --slaveof 127.0.0.1 6380")
22+
$pids << spawn("redis-server --port 63800 --slaveof 127.0.0.1 6380 --loglevel warning")
23+
$pids << spawn("redis-server --port 63801 --slaveof 127.0.0.1 6380 --loglevel warning")
2424

2525
# Slaves of Master 2
26-
$pids << spawn("redis-server --port 63810 --slaveof 127.0.0.1 6381")
27-
$pids << spawn("redis-server --port 63811 --slaveof 127.0.0.1 6381")
26+
$pids << spawn("redis-server --port 63810 --slaveof 127.0.0.1 6381 --loglevel warning")
27+
$pids << spawn("redis-server --port 63811 --slaveof 127.0.0.1 6381 --loglevel warning")
2828

2929
FileUtils.cp(File.join(base, "sentinel.conf"), "tmp/sentinel1.conf")
3030
FileUtils.cp(File.join(base, "sentinel.conf"), "tmp/sentinel2.conf")

0 commit comments

Comments
 (0)