Skip to content

Commit

Permalink
inherit worker context
Browse files Browse the repository at this point in the history
  • Loading branch information
dleviminzi committed Jan 10, 2025
1 parent bbaf479 commit 6d8a498
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func (s *Worker) Run() error {
if !exists {
log.Info().Str("container_id", containerId).Msg("running container")

ctx, cancel := context.WithCancel(context.Background())
ctx, cancel := context.WithCancel(s.ctx)
eventbus := common.NewEventBus(s.redisClient, common.EventBusSubscriber{Type: common.EventType("stop-build" + "-" + containerId), Callback: func(e *common.Event) bool {
log.Info().Str("container_id", containerId).Msg("received stop build event")
cancel()
Expand Down

0 comments on commit 6d8a498

Please sign in to comment.