From 79e3f44331fe626a885a763a9ac37ebce6aac71d Mon Sep 17 00:00:00 2001 From: wangyidong Date: Wed, 4 Dec 2024 10:24:05 +0800 Subject: [PATCH] * [perf story #69871] Adjust code. --- module/execution/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/execution/model.php b/module/execution/model.php index 7935980563..a5eb448cea 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4784,8 +4784,7 @@ class executionModel extends model $task->totalEstimate = $task->estimate; $task->totalConsumed = $task->consumed; $task->totalLeft = $task->left; - $task->isParent = ($task->parent < 0); - $task->parent = $task->parent <= 0 || !isset($tasks[$task->parent]) ? 'pid' . (string)$task->execution : 'tid' . (string)$task->parent; + $task->parent = $task->parent > 0 && isset($tasks[$task->parent]) ? "tid{$task->parent}" : "pid{$task->execution}"; $task->progress = ($task->consumed + $task->left) == 0 ? 0 : round($task->consumed / ($task->consumed + $task->left), 2) * 100; $task->begin = $task->estStarted; $task->end = $task->deadline;