Skip to content

Commit

Permalink
chore: allow signals to send after watch flag restarts tasks (#5593)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
  • Loading branch information
CaptainCarpensir authored Jan 8, 2024
1 parent 1db6ad3 commit 8f8e0b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/pkg/cli/run_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ func (o *runLocalOpts) Execute() error {
o.orchestrator.Stop()
break
}

// If TaskRole is retrieved through ECS Exec, OS signals are no longer provided to the channel.
// We reset this channel connection through this call as a short term fix that allows
// the interrupt and terminate signal to stop tasks after the task has been restarted by --watch.
signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
o.orchestrator.RunTask(task)
}
}
Expand Down

0 comments on commit 8f8e0b3

Please sign in to comment.