You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ly...@apache.org on 2024/08/26 08:11:44 UTC

(incubator-devlake) branch main updated: chore(framework): add logs when subtask is finished (#7952)

This is an automated email from the ASF dual-hosted git repository.

lynwee pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new 5f9dd3db0 chore(framework): add logs when subtask is finished (#7952)
5f9dd3db0 is described below

commit 5f9dd3db0aa3e1ced56d985b9694b60e557efbf7
Author: Lynwee <15...@qq.com>
AuthorDate: Mon Aug 26 16:11:40 2024 +0800

    chore(framework): add logs when subtask is finished (#7952)
---
 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 aee9c5875..407429926 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, "")