Skip to content

Commit 5d2ecfe

Browse files
committed
update
Signed-off-by: Tihomir Surdilovic <[email protected]>
1 parent 508722d commit 5d2ecfe

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cancellation/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func (a *Activities) ActivityToBeCanceled(ctx context.Context) (string, error) {
2121
activity.RecordHeartbeat(ctx, "")
2222
case <-ctx.Done():
2323
logger.Info("context is cancelled")
24-
return "I am canceled by Done", ctx.Err()
24+
return "", ctx.Err()
2525
}
2626
}
2727
}

cancellation/workflow.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package cancellation
22

33
import (
44
"errors"
5-
"fmt"
65
"go.temporal.io/sdk/workflow"
76
"time"
87
)
@@ -39,7 +38,6 @@ func YourWorkflow(ctx workflow.Context) error {
3938
if err != nil {
4039
return err
4140
}
42-
logger.Info(fmt.Sprintf("ActivityToBeCanceled returns %v, %v", result, err))
4341

4442
err = workflow.ExecuteActivity(ctx, a.ActivityToBeSkipped).Get(ctx, nil)
4543
logger.Error("Error from ActivityToBeSkipped", "Error", err)

0 commit comments

Comments
 (0)