Skip to content

Commit

Permalink
Nicer output for restart backoff
Browse files Browse the repository at this point in the history
  • Loading branch information
cortesi committed Jul 25, 2018
1 parent aae8e95 commit 36af15f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@ func (d *daemon) Run() {
var lastStart time.Time
delay := MinRestart
for d.stop != true {
if delay > MinRestart {
d.log.Notice(">> restart backoff... %dms", delay/time.Millisecond)
}
if !lastStart.IsZero() {
d.log.Notice(">> sleeping... %#v", delay)
time.Sleep(delay)
}
d.log.Notice(">> starting...")
Expand Down

0 comments on commit 36af15f

Please sign in to comment.