Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit b9ed5a7

Browse files
committed
Fix #1288
1 parent daa8e54 commit b9ed5a7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/plugins/action.scheduler/src/Scheduler.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,11 @@ public function handleTasks(ServerRequestInterface $requestInterface, ResponseIn
326326
$task = TaskService::getInstance()->getTaskById(InputFilter::sanitize($httpVars["task_id"], InputFilter::SANITIZE_ALPHANUM));
327327
if($task !== null){
328328
$children = $task->getChildrenTasks();
329-
if(!empty($children)){
330-
throw new PydioException("This task has currently jobs running, please wait that they are finished");
329+
foreach ($children as $child){
330+
if($child->getStatus() === Task::STATUS_RUNNING){
331+
throw new PydioException("This task has currently jobs running, please wait that they are finished");
332+
}
333+
TaskService::getInstance()->deleteTask($child->getId());
331334
}
332335
TaskService::getInstance()->deleteTask($task->getId());
333336
}

0 commit comments

Comments
 (0)