diff --git a/internal/services/executor/executor.go b/internal/services/executor/executor.go index 5191abe..e50eaf5 100644 --- a/internal/services/executor/executor.go +++ b/internal/services/executor/executor.go @@ -788,8 +788,8 @@ func (e *Executor) executeTask(ctx context.Context, et *types.ExecutorTask) { if err := e.setupTask(ctx, rt); err != nil { log.Errorf("err: %+v", err) - rt.et.Status.Phase = types.ExecutorTaskPhaseFailed - et.Status.SetupStep.EndTime = util.TimePtr(time.Now()) + et.Status.Phase = types.ExecutorTaskPhaseFailed + et.Status.EndTime = util.TimePtr(time.Now()) et.Status.SetupStep.Phase = types.ExecutorTaskPhaseFailed et.Status.SetupStep.EndTime = util.TimePtr(time.Now()) if err := e.sendExecutorTaskStatus(ctx, et); err != nil { @@ -812,12 +812,12 @@ func (e *Executor) executeTask(ctx context.Context, et *types.ExecutorTask) { rt.Lock() if err != nil { log.Errorf("err: %+v", err) - rt.et.Status.Phase = types.ExecutorTaskPhaseFailed + et.Status.Phase = types.ExecutorTaskPhaseFailed } else { - rt.et.Status.Phase = types.ExecutorTaskPhaseSuccess + et.Status.Phase = types.ExecutorTaskPhaseSuccess } - rt.et.Status.EndTime = util.TimePtr(time.Now()) + et.Status.EndTime = util.TimePtr(time.Now()) if err := e.sendExecutorTaskStatus(ctx, et); err != nil { log.Errorf("err: %+v", err)