From a9000c5af30601d21e10c560417ff7e17ddeaa0b Mon Sep 17 00:00:00 2001 From: Victor Vrantchan Date: Mon, 28 Nov 2016 10:35:05 -0500 Subject: [PATCH] print connection sleep interval duration in seconds (#534) The duration was printed with a "ns" interval, even though the sleep time was in seconds. --- server/datastore/mysql/datastore.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/datastore/mysql/datastore.go b/server/datastore/mysql/datastore.go index 0ff2576f70..e1be903b2d 100644 --- a/server/datastore/mysql/datastore.go +++ b/server/datastore/mysql/datastore.go @@ -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 {