Skip to content

Commit 9442b81

Browse files
committed
[control-operator] disable grpc streams for time being
1 parent 3cf91fb commit 9442b81

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

control-operator/internal/controller/grpc_client.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,11 +171,16 @@ func (c *OccClient) ConsumeIfReady(ctx context.Context) bool {
171171
c.log.V(1).Info("connection is in different state than ready", "conn state", connState.String())
172172
return false
173173
}
174-
clientCtx, clientCancel := context.WithCancel(context.Background())
174+
// clientCtx, clientCancel := context.WithCancel(context.Background())
175+
_, clientCancel := context.WithCancel(context.Background())
175176
c.cancel = &clientCancel
176177

177-
go c.ConsumeEventStream(clientCtx)
178-
go c.ConsumeStateStream(clientCtx)
178+
// TODO: Streams are not used anywhere now so we turn them off until they are fixed/useful
179+
// they are not useful for now because any Transition call imediately returns final
180+
// status. So for now we don't need them. Of course the problem is that if something
181+
// changes inside OCC container we have no way how to detect it now.
182+
// go c.ConsumeEventStream(clientCtx)
183+
// go c.ConsumeStateStream(clientCtx)
179184
return true
180185
}
181186

0 commit comments

Comments
 (0)