Skip to content

Commit

Permalink
quick fix for aggregator
Browse files Browse the repository at this point in the history
  • Loading branch information
NorseGaud committed Dec 2, 2024
1 parent 48896af commit 9418ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func main() {

logger := logging.New()
parentCtx := context.Background()
parentCtx = context.WithValue(parentCtx, config.ContextKey("logger"), logger)

if version == "" {
version = "dev" // Default version if not set by go build
Expand Down Expand Up @@ -373,7 +374,6 @@ func worker(parentCtx context.Context, logger *slog.Logger, loadedConfig config.
go func(plugin config.Plugin) {
defer wg.Done()
pluginCtx, pluginCancel := context.WithCancel(workerCtx) // Inherit from parent context
pluginCtx = context.WithValue(pluginCtx, config.ContextKey("logger"), logger)

if plugin.Name == "" {
panic("name is required for plugins")
Expand Down

0 comments on commit 9418ec9

Please sign in to comment.