Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud committed Dec 13, 2024
1 parent d606aaa commit f921772
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,16 +326,16 @@ func worker(
os.Exit(1)
}
workerCtx = context.WithValue(workerCtx, config.ContextKey("database"), databaseContainer)
go metricsService.StartAggregatorServer(workerCtx, logger, false)
logger.InfoContext(workerCtx, "metrics aggregator started on port "+metricsPort)
go metricsService.StartAggregatorServer(workerCtx, parentLogger, false)
parentLogger.InfoContext(workerCtx, "metrics aggregator started on port "+metricsPort)
wg.Add(1)
defer wg.Done()
pluginCtx, pluginCancel := context.WithCancel(workerCtx) // Inherit from parent context
for {
select {
case <-workerCtx.Done():
pluginCancel()
logger.WarnContext(pluginCtx, shutDownMessage)
parentLogger.WarnContext(pluginCtx, shutDownMessage)
return
default:
if workerCtx.Err() != nil || toRunOnce == "true" {
Expand Down

0 comments on commit f921772

Please sign in to comment.