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:
Victor Vrantchan 2016-11-28 10:35:05 -05:00 committed by GitHub
parent 44ef92550f
commit a9000c5af3

View file

@ -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 {