Skip to content

Commit

Permalink
Add some comments in reference to global shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reagor committed Oct 19, 2017
1 parent a6dd7a6 commit 9c8c376
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ func (a *App) Run() {
// `IsComplete`, and shutdown ContainerPilot if all jobs are
// completed. This is because ContainerPilot is NOT a server and must
// shut down when no longer required (i.e. process containers).
//
// Consider that this fires the global context.CancelFunc after all jobs
// have completed. This means we'll serialize the shut down of all
// dependent services, control server, telemetry, watches, metrics,
// after jobs have finalized here (quit == true). This is the reason the
// signal handler above, and reload endpoint, only need to fire a
// GlobalShutdown across the event bus. Context handles everything after
// that process.
completedCh := make(chan bool)
go func() {
for {
Expand Down

0 comments on commit 9c8c376

Please sign in to comment.