polish log print

v4
vinllen 5 years ago
parent 77dbdf03cf
commit 082a080faa
  1. 4
      src/redis-shake/dump.go
  2. 4
      src/redis-shake/sync.go

@ -141,10 +141,10 @@ func (dd *dbDumper) sendCmd(master, auth_type, passwd string, tlsEnable bool) (n
select {
case nsize = <-wait:
if nsize == 0 {
log.Infof("routine[%v] +", dd.id)
log.Infof("routine[%v] + waiting rdb done", dd.id)
}
case <-time.After(time.Second):
log.Infof("routine[%v] -", dd.id)
log.Infof("routine[%v] - waiting rdb done", dd.id)
}
}
return c, nsize

@ -264,12 +264,12 @@ func (ds *dbSyncer) sendSyncCmd(master, auth_type, passwd string, tlsEnable bool
select {
case nsize := <-wait:
if nsize == 0 {
log.Infof("dbSyncer[%v] +", ds.id)
log.Infof("dbSyncer[%v] + waiting rdb done", ds.id)
} else {
return c, nsize
}
case <-time.After(time.Second):
log.Infof("dbSyncer[%v] -", ds.id)
log.Infof("dbSyncer[%v] - waiting rdb done", ds.id)
}
}
}

Loading…
Cancel
Save