engine: resources, graph: Change the done channel into a ctx

This is part one of porting Watch to context.
This commit is contained in:
James Shubin
2023-08-07 19:44:41 -04:00
parent 5eac48094b
commit 53a878bf61
34 changed files with 73 additions and 66 deletions

View File

@@ -502,7 +502,7 @@ func (obj *AwsEc2Res) longpollWatch() error {
send = true
}
case <-obj.init.Done: // closed by the engine to signal shutdown
case <-obj.init.DoneCtx.Done(): // closed by the engine to signal shutdown
return nil
}
@@ -596,7 +596,7 @@ func (obj *AwsEc2Res) snsWatch() error {
obj.init.Logf("State: %v", msg.event)
send = true
case <-obj.init.Done: // closed by the engine to signal shutdown
case <-obj.init.DoneCtx.Done(): // closed by the engine to signal shutdown
return nil
}