* Compute progress only without changing task object.

This commit is contained in:
dingguodong
2023-08-25 13:55:00 +08:00
parent cc76900757
commit 4327d541e2
+5 -1
View File
@@ -329,7 +329,11 @@ class taskTao extends taskModel
$childrenStatus = array();
/* 有的任务对象不是通过taskModel::getByID获取的(比如执行的任务列表),因此可能没有children,需要重新获取它的子任务。*/
if(!isset($task->children)) $task->children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($task->id)->fetchAll('id');
if(!isset($task->children))
{
$task = clone $task;
$task->children = $this->dao->select('*')->from(TABLE_TASK)->where('parent')->eq($task->id)->fetchAll('id');
}
foreach($task->children as $childTask)
{