only print once
This commit is contained in:
parent
a910d14858
commit
f0b28749dc
1 changed files with 3 additions and 2 deletions
|
@ -17,8 +17,6 @@ func (c *Context) DeleteExpired() error {
|
||||||
if retx.RowsAffected > 0 {
|
if retx.RowsAffected > 0 {
|
||||||
log.Infof("Flushed %d expired entries from Ban Application", retx.RowsAffected)
|
log.Infof("Flushed %d expired entries from Ban Application", retx.RowsAffected)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
log.Infof("flush is disabled")
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -136,6 +134,9 @@ func (c *Context) AutoCommit() {
|
||||||
ticker := time.NewTicker(200 * time.Millisecond)
|
ticker := time.NewTicker(200 * time.Millisecond)
|
||||||
cleanUpTicker := time.NewTicker(1 * time.Minute)
|
cleanUpTicker := time.NewTicker(1 * time.Minute)
|
||||||
expireTicker := time.NewTicker(1 * time.Second)
|
expireTicker := time.NewTicker(1 * time.Second)
|
||||||
|
if !c.flush {
|
||||||
|
log.Infof("flush is disabled")
|
||||||
|
}
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-c.PusherTomb.Dying():
|
case <-c.PusherTomb.Dying():
|
||||||
|
|
Loading…
Add table
Reference in a new issue