Skip to content

Commit 02905c2

Browse files
committed
no. of running task number fix
1 parent 236f8b0 commit 02905c2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

container_provisioner/api/controllers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func getRunningTasks(c *fiber.Ctx) error {
211211
currentTaskStatus := "There are no running tasks"
212212

213213
if len(Containers) > 0 {
214-
currentTaskStatus = fmt.Sprintf("%s task(s) running", strconv.Itoa(len(Containers)-1))
214+
currentTaskStatus = fmt.Sprintf("%s task(s) running", strconv.Itoa(len(Containers)-2))
215215
}
216216

217217
return c.Render("tasks", fiber.Map{

container_provisioner/containers/helper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ func CountRunningContainer() int {
102102
if isContainer == "" {
103103
return len(containers)
104104
}
105-
// -1 otherwise the current process will also be counted as a running container
106-
return len(containers) - 1
105+
// 21 otherwise the current process and redis will also be counted as a running container
106+
return len(containers) - 2
107107
}
108108

109109
// tailLog tails the log of the container with the given ID

0 commit comments

Comments
 (0)