pabloem commented on a change in pull request #15926:
URL: https://github.com/apache/beam/pull/15926#discussion_r747801298



##########
File path: playground/backend/cmd/server/controller.go
##########
@@ -447,13 +469,27 @@ func processSuccess(ctx context.Context, output []byte, 
pipelineId uuid.UUID, ca
 
                setToCache(ctx, cacheService, pipelineId, cache.RunOutput, 
string(output))
 
+               // set to cache pipelineId: cache.Canceled: false to stop 
cancelCheck() method
+               setToCache(ctx, cacheService, pipelineId, cache.Canceled, false)
+
+               // set to cache pipelineId: cache.SubKey_Status: 
pb.Status_STATUS_FINISHED
                setToCache(ctx, cacheService, pipelineId, cache.Status, 
pb.Status_STATUS_FINISHED)
        }
 }
 
+// processCancel process case when code processing was canceled
+func processCancel(ctx context.Context, cacheService cache.Cache, pipelineId 
uuid.UUID) {
+       logger.Infof("%s: was canceled\n", pipelineId)
+
+       // set to cache pipelineId: cache.SubKey_Status: 
pb.Status_STATUS_CANCELED
+       setToCache(ctx, cacheService, pipelineId, cache.Status, 
pb.Status_STATUS_CANCELED)

Review comment:
       makes sense. Thanks for laying it out clearly : )




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