Skip to content

Commit

Permalink
fix: use cluster signal to exit service status runner (#230)
Browse files Browse the repository at this point in the history
TODO: refactor how service is started and shutdown

Signed-off-by: Artur Troian <[email protected]>
  • Loading branch information
troian authored Apr 11, 2024
1 parent 49d5caa commit a41a724
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions cluster/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,6 @@ func (s *service) run(ctx context.Context, deployments []ctypes.IDeployment) {
}
}

// var inv provider.Inventory

trySignal()

loop:
Expand Down
2 changes: 1 addition & 1 deletion service.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func (s *service) statusRun() {
loop:
for {
select {
case <-s.lc.ShutdownRequest():
case <-s.cluster.Done():
return
case evt := <-events:
switch obj := evt.(type) {
Expand Down

0 comments on commit a41a724

Please sign in to comment.