From e3c0b2ee5ba1b09f4f8adfb69fb2721f2a32846e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 16:12:44 +0800 Subject: [PATCH] chore(framework): add logs when subtask is finished (#7952) (#7953) Co-authored-by: Lynwee <1507509064@qq.com> --- backend/core/runner/run_task.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/core/runner/run_task.go b/backend/core/runner/run_task.go index aee9c587544..40742992689 100644 --- a/backend/core/runner/run_task.go +++ b/backend/core/runner/run_task.go @@ -324,7 +324,9 @@ func RunPluginSubTasks( logger.Info("subtask %s already finished previously", subtaskMeta.Name) } else { logger.Info("executing subtask %s", subtaskMeta.Name) + start := time.Now() err = runSubtask(basicRes, subtaskCtx, task.ID, subtaskNumber, subtaskMeta.EntryPoint) + logger.Info("subtask %s finished in %s", subtaskMeta.Name, time.Since(start).Milliseconds()) if err != nil { err = errors.SubtaskErr.Wrap(err, fmt.Sprintf("subtask %s ended unexpectedly", subtaskMeta.Name), errors.WithData(&subtaskMeta)) logger.Error(err, "")