From 8133cfdbb7b397f0f811329eb234f9b2eaf92f48 Mon Sep 17 00:00:00 2001 From: siddontang Date: Thu, 30 Oct 2014 09:00:19 +0800 Subject: [PATCH] update server TTL check --- cmd/ledis-server/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ledis-server/main.go b/cmd/ledis-server/main.go index 0ba897c..70328c4 100644 --- a/cmd/ledis-server/main.go +++ b/cmd/ledis-server/main.go @@ -24,7 +24,7 @@ var slaveof = flag.String("slaveof", "", "make the server a slave of another ins var readonly = flag.Bool("readonly", false, "set readonly mode, salve server is always readonly") var rpl = flag.Bool("rpl", false, "enable replication or not, slave server is always enabled") var rplSync = flag.Bool("rpl_sync", false, "enable sync replication or not") -var ttlCheck = flag.Int("ttl_check", 1, "TTL check interval") +var ttlCheck = flag.Int("ttl_check", 0, "TTL check interval") func main() { runtime.GOMAXPROCS(runtime.NumCPU()) @@ -68,7 +68,9 @@ func main() { cfg.Replication.Sync = *rplSync } - cfg.TTLCheckInterval = *ttlCheck + if *ttlCheck > 0 { + cfg.TTLCheckInterval = *ttlCheck + } var app *server.App app, err = server.NewApp(cfg)