MCPcopy Create free account
hub / github.com/compozy/agh / recoverTaskRunBundle

Function recoverTaskRunBundle

internal/cli/task.go:4319–4350  ·  view source on GitHub ↗
(record *RetryTaskRunRecord)

Source from the content-addressed store, hash-verified

4317}
4318
4319func recoverTaskRunBundle(record *RetryTaskRunRecord) outputBundle {
4320 return outputBundle{
4321 jsonValue: record,
4322 human: func() (string, error) {
4323 return renderHumanSection("Task Run Recovery", []keyValue{
4324 {Label: "Recovered Run", Value: stringOrDash(record.PreviousRun.ID)},
4325 {Label: "Recovered Status", Value: stringOrDash(string(record.PreviousRun.Status))},
4326 {Label: "New Run", Value: stringOrDash(record.Run.ID)},
4327 {Label: taskTaskValue, Value: stringOrDash(record.Run.TaskID)},
4328 {Label: taskStatusValue, Value: stringOrDash(string(record.Run.Status))},
4329 {Label: taskAttemptValue, Value: intOrDash(record.Run.Attempt)},
4330 }), nil
4331 },
4332 toon: func() (string, error) {
4333 return renderToonObject("task_run_recovery", []string{
4334 "recovered_run_id",
4335 "recovered_status",
4336 "new_run_id",
4337 taskTaskIDKey,
4338 taskStatusKey,
4339 taskAttemptKey,
4340 }, []string{
4341 record.PreviousRun.ID,
4342 string(record.PreviousRun.Status),
4343 record.Run.ID,
4344 record.Run.TaskID,
4345 string(record.Run.Status),
4346 strconv.Itoa(record.Run.Attempt),
4347 }), nil
4348 },
4349 }
4350}
4351
4352func bulkForceTaskRunBundle(record BulkForceTaskRunRecord) outputBundle {
4353 return listBundle(

Callers 1

newTaskRunRecoverCommandFunction · 0.85

Calls 4

renderHumanSectionFunction · 0.85
stringOrDashFunction · 0.85
intOrDashFunction · 0.85
renderToonObjectFunction · 0.85

Tested by

no test coverage detected