feat(taskactions): retry a parked task on the current workflow definition

This commit is contained in:
sam committed 2026-10-17 13:35:12 +11:00
1 parent c80d4750a8
commit 9d7287c647
18 files changed
+134 -58

No files matched your search

@@ -890,17 +890,21 @@ UPDATE tasks SET status = 'queued', retry_count = retry_count + 1,
workflow = CASE WHEN $1::text = '' THEN workflow ELSE $1::text END,
retry_mode = $2::text,
resume_from = $3::text, resume_results = $4::jsonb,
workflow_definition_yaml = CASE WHEN $5::bool THEN '' ELSE workflow_definition_yaml END,
workflow_definition_digest = CASE WHEN $5::bool THEN '' ELSE workflow_definition_digest END,
workflow_definition_version = CASE WHEN $5::bool THEN 0 ELSE workflow_definition_version END,
park_reason = '', park_class = 'needs_human', updated_at = now()
WHERE id = $5 AND status = $6
WHERE id = $6 AND status = $7
`
type RetryTaskParams struct {
Workflow string
RetryMode string
ResumeFrom string
ResumeResults []byte
ID int64
FromStatus string
Workflow string
RetryMode string
ResumeFrom string
ResumeResults []byte
CurrentDefinition bool
ID int64
FromStatus string
}
func (q *Queries) RetryTask(ctx context.Context, arg RetryTaskParams) (int64, error) {
@@ -909,6 +913,7 @@ func (q *Queries) RetryTask(ctx context.Context, arg RetryTaskParams) (int64, er
arg.RetryMode,
arg.ResumeFrom,
arg.ResumeResults,
arg.CurrentDefinition,
arg.ID,
arg.FromStatus,
)