forked from TrueCloudLab/frostfs-node
[#1437] ir: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
62b5181618
commit
c139892117
5 changed files with 39 additions and 38 deletions
|
@ -106,7 +106,7 @@ func main() {
|
|||
log.Info(ctx, logs.CommonApplicationStarted,
|
||||
zap.String("version", misc.Version))
|
||||
|
||||
watchForSignal(cancel)
|
||||
watchForSignal(ctx, cancel)
|
||||
|
||||
<-ctx.Done() // graceful shutdown
|
||||
log.Debug(ctx, logs.FrostFSNodeWaitingForAllProcessesToStop)
|
||||
|
@ -115,20 +115,20 @@ func main() {
|
|||
log.Info(ctx, logs.FrostFSIRApplicationStopped)
|
||||
}
|
||||
|
||||
func shutdown() {
|
||||
innerRing.Stop()
|
||||
func shutdown(ctx context.Context) {
|
||||
innerRing.Stop(ctx)
|
||||
if err := metricsCmp.shutdown(); err != nil {
|
||||
log.Debug(context.Background(), logs.FrostFSIRCouldNotShutdownHTTPServer,
|
||||
log.Debug(ctx, logs.FrostFSIRCouldNotShutdownHTTPServer,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
if err := pprofCmp.shutdown(); err != nil {
|
||||
log.Debug(context.Background(), logs.FrostFSIRCouldNotShutdownHTTPServer,
|
||||
log.Debug(ctx, logs.FrostFSIRCouldNotShutdownHTTPServer,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
|
||||
if err := sdnotify.ClearStatus(); err != nil {
|
||||
log.Error(context.Background(), logs.FailedToReportStatusToSystemd, zap.Error(err))
|
||||
log.Error(ctx, logs.FailedToReportStatusToSystemd, zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue