Skip to content

Commit

Permalink
tweak ScheduleToCloseTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanos committed Oct 4, 2024
1 parent a0d812c commit 4dbc622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions early-return/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func Workflow(ctx workflow.Context, tx Transaction) error {
// See https://docs.temporal.io/activities#local-activity for more details.

activityOptions := workflow.WithLocalActivityOptions(ctx, workflow.LocalActivityOptions{
ScheduleToCloseTimeout: 10 * time.Second,
ScheduleToCloseTimeout: 7 * time.Second,
})
tx.initErr = workflow.ExecuteLocalActivity(activityOptions, tx.InitTransaction).Get(ctx, nil)
tx.initDone = true
Expand Down Expand Up @@ -92,7 +92,7 @@ func (tx *Transaction) InitTransaction(ctx context.Context) error {
if tx.Amount <= 0 {
return errors.New("invalid Amount")
}
time.Sleep(500 * time.Millisecond)
time.Sleep(10 * time.Second)
logger.Info("Transaction initialized")
return nil
}
Expand Down

0 comments on commit 4dbc622

Please sign in to comment.