TSultanov commented on code in PR #25078:
URL: https://github.com/apache/beam/pull/25078#discussion_r1091913260


##########
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:
   We are: 
https://github.com/apache/beam/blob/2e5633285849f8d9249b435881e7345bf2bc2c89/playground/backend/internal/code_processing/code_processing.go#L60
   
   the code in question additionally polls if cancellation was requested 
through the API: 
https://github.com/apache/beam/blob/2e5633285849f8d9249b435881e7345bf2bc2c89/playground/backend/cmd/server/controller.go#L309



-- 
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]

Reply via email to