Skip to content

Commit

Permalink
fix: add ejob ended date + fix restart job with runresult (#6838)
Browse files Browse the repository at this point in the history
  • Loading branch information
sguiheux authored Feb 16, 2024
1 parent 563055c commit 4b641a7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions engine/api/v2_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ func (api *API) postJobResultHandler() ([]service.RbacChecker, service.Handler)
}

jobRun.Status = result.Status
jobRun.Ended = time.Now()

tx, err := api.mustDB().Begin()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion engine/api/v2_workflow_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ func restartWorkflowRun(ctx context.Context, tx gorpmapper.SqlExecutorWithTx, wr
}
for _, r := range runResults {
duplicatedRunResult := r
duplicatedRunResult.ID = ""
duplicatedRunResult.ID = sdk.UUID()
duplicatedRunResult.WorkflowRunJobID = duplicatedRJ.ID
duplicatedRunResult.RunAttempt = duplicatedRJ.RunAttempt
if err := workflow_v2.InsertRunResult(ctx, tx, &duplicatedRunResult); err != nil {
Expand Down

0 comments on commit 4b641a7

Please sign in to comment.