mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 17:08:53 +00:00
print connection sleep interval duration in seconds (#534)
The duration was printed with a "ns" interval, even though the sleep time was in seconds.
This commit is contained in:
parent
44ef92550f
commit
a9000c5af3
1 changed files with 3 additions and 3 deletions
|
|
@ -50,10 +50,10 @@ func New(dbConnectString string, c clock.Clock, opts ...DBOption) (*Datastore, e
|
|||
// we're connected!
|
||||
break
|
||||
}
|
||||
sleep := time.Duration(attempt)
|
||||
interval := time.Duration(attempt) * time.Second
|
||||
options.logger.Log("mysql", fmt.Sprintf(
|
||||
"could not connect to db: %v, sleeping %v", dbError, sleep))
|
||||
time.Sleep(sleep * time.Second)
|
||||
"could not connect to db: %v, sleeping %v", dbError, interval))
|
||||
time.Sleep(interval)
|
||||
}
|
||||
|
||||
if dbError != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue