You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/09/30 04:50:01 UTC

[incubator-devlake] branch main updated (b110ad5e -> 446be617)

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

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


    from b110ad5e fix: change some wording (#3291)
     new fb4d976c fix: fix-3256
     new 446be617 chore: rename getTaskById to getRunningTaskById

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 services/task.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


[incubator-devlake] 02/02: chore: rename getTaskById to getRunningTaskById

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 446be617ec91abdd8240dfa083f26a9b081e7b62
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Fri Sep 30 12:48:34 2022 +0800

    chore: rename getTaskById to getRunningTaskById
---
 services/task.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/services/task.go b/services/task.go
index cec571fe..43d41f1c 100644
--- a/services/task.go
+++ b/services/task.go
@@ -279,7 +279,7 @@ func runTaskStandalone(parentLog core.Logger, taskId uint64) errors.Error {
 	return err
 }
 
-func getTaskById(taskId uint64) *RunningTaskData {
+func getRunningTaskById(taskId uint64) *RunningTaskData {
 	runningTasks.mu.Lock()
 	defer runningTasks.mu.Unlock()
 
@@ -287,7 +287,7 @@ func getTaskById(taskId uint64) *RunningTaskData {
 }
 
 func updateTaskProgress(taskId uint64, progress chan core.RunningProgress) {
-	data := getTaskById(taskId)
+	data := getRunningTaskById(taskId)
 	if data == nil {
 		return
 	}


[incubator-devlake] 01/02: fix: fix-3256

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fb4d976c658fb5b5ca032095f08e492fd1f386d8
Author: Nddtfjiang <jz...@qq.com>
AuthorDate: Fri Sep 30 01:37:20 2022 +0000

    fix: fix-3256
    
    Add GetTaskById.
    
    Nddtfjiang <zh...@merico.dev>
---
 services/task.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/services/task.go b/services/task.go
index 43b77cf4..cec571fe 100644
--- a/services/task.go
+++ b/services/task.go
@@ -279,8 +279,15 @@ func runTaskStandalone(parentLog core.Logger, taskId uint64) errors.Error {
 	return err
 }
 
+func getTaskById(taskId uint64) *RunningTaskData {
+	runningTasks.mu.Lock()
+	defer runningTasks.mu.Unlock()
+
+	return runningTasks.tasks[taskId]
+}
+
 func updateTaskProgress(taskId uint64, progress chan core.RunningProgress) {
-	data := runningTasks.tasks[taskId]
+	data := getTaskById(taskId)
 	if data == nil {
 		return
 	}