damondouglas commented on code in PR #25078:
URL: https://github.com/apache/beam/pull/25078#discussion_r1090904479
##########
playground/backend/internal/code_processing/code_processing.go:
##########
@@ -399,13 +399,13 @@ func cancelCheck(ctx context.Context, pipelineId
uuid.UUID, cancelChannel chan b
return
case <-ticker.C:
cancel, err := cacheService.GetValue(ctx, pipelineId,
cache.Canceled)
- if err != nil {
- logger.Errorf("%s: Error during getting value
from the cache: %s", pipelineId, err.Error())
- }
- if cancel.(bool) {
+ if err == context.DeadlineExceeded || (err == nil &&
cancel.(bool)) {
cancelChannel <- true
return
}
Review Comment:
Is there a reason we are not following this pattern:
https://go.dev/play/p/j9Edbjx2y5x?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]