You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "damondouglas (via GitHub)" <gi...@apache.org> on 2023/01/30 17:04:23 UTC

[GitHub] [beam] damondouglas commented on a diff in pull request #25078: [Playground] Fix crash when example pipeline execution times out

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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org