feat: recover workflow waits within original deadlines
This commit is contained in:
@@ -98,13 +98,9 @@ func (r *WorkflowRuntime) applyWorkflowSignal(ctx context.Context, tx *sql.Tx, g
|
||||
if row.view.State != weave.StepWaiting || poll.NextPollAt == nil {
|
||||
return false, false, "", errors.New("signal poll continuation missing")
|
||||
}
|
||||
var disposition string
|
||||
if err := tx.QueryRowContext(ctx, `SELECT error_code FROM weave_inbox WHERE namespace_id=? AND workflow_id=? AND source_task_id=? AND source_activation_id=? AND state='PROCESSED' ORDER BY source_revision DESC LIMIT 1`, g.view.NamespaceID, g.view.ID, last, row.view.ActivationID).Scan(&disposition); err != nil {
|
||||
if err := verifyWorkflowPollPending(ctx, tx, g, row, poll, last, now); err != nil {
|
||||
return false, false, "", err
|
||||
}
|
||||
if disposition != "POLL_PENDING" {
|
||||
return false, false, "", errors.New("signal poll previous round not pending")
|
||||
}
|
||||
}
|
||||
}
|
||||
v, err := selectedWorkflowSignal(ctx, tx, g, row, w, now)
|
||||
|
||||
Reference in New Issue
Block a user