fix stopStat used instead of startStat

This commit is contained in:
Roman Khafizianov 2023-06-22 16:20:57 +02:00
parent 027dcd15a1
commit f63481edcc
No known key found for this signature in database
GPG Key ID: F07A7D55A2684852

View File

@ -226,7 +226,7 @@ func (app *App) Start(ctx context.Context) (err error) {
case <-done: case <-done:
return return
case <-time.After(StartWarningAfter): case <-time.After(StartWarningAfter):
l := app.statLogger(app.stopStat, log).With(zap.String("in_progress", currentComponentStarting)) l := app.statLogger(app.startStat, log).With(zap.String("in_progress", currentComponentStarting))
l.Warn("components start in progress") l.Warn("components start in progress")
} }
}() }()
@ -261,7 +261,7 @@ func (app *App) Start(ctx context.Context) (err error) {
} }
close(done) close(done)
l := app.statLogger(app.stopStat, log) l := app.statLogger(app.startStat, log)
if app.startStat.SpentMsTotal > StartWarningAfter.Milliseconds() { if app.startStat.SpentMsTotal > StartWarningAfter.Milliseconds() {
l.Warn("all components started") l.Warn("all components started")