Skip to content

Commit 0587c46

Browse files
committed
fix
1 parent 27a0cc1 commit 0587c46

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

backend/pkg/lifecycle/taskhook.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ func (h *TaskHook) handleProcessing(ctx context.Context, id uuid.UUID, metadata
8787

8888
defer h.redis.Del(ctx, reqKey)
8989

90+
if err := h.repo.Update(ctx, &domain.User{}, id, func(up *db.TaskUpdateOne) error {
91+
up.SetStatus(consts.TaskStatusProcessing)
92+
return nil
93+
}); err != nil {
94+
return fmt.Errorf("failed to update task status: %w", err)
95+
}
96+
9097
var createReq taskflow.CreateTaskReq
9198
if err := json.Unmarshal([]byte(val), &createReq); err != nil {
9299
h.logger.With("task_id", id, "error", err).ErrorContext(ctx, "failed to unmarshal CreateTaskReq")

0 commit comments

Comments
 (0)