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

Commit

Permalink
Fix #1288
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Nov 19, 2016
1 parent daa8e54 commit b9ed5a7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/src/plugins/action.scheduler/src/Scheduler.php
Expand Up @@ -326,8 +326,11 @@ public function handleTasks(ServerRequestInterface $requestInterface, ResponseIn
$task = TaskService::getInstance()->getTaskById(InputFilter::sanitize($httpVars["task_id"], InputFilter::SANITIZE_ALPHANUM));
if($task !== null){
$children = $task->getChildrenTasks();
if(!empty($children)){
throw new PydioException("This task has currently jobs running, please wait that they are finished");
foreach ($children as $child){
if($child->getStatus() === Task::STATUS_RUNNING){
throw new PydioException("This task has currently jobs running, please wait that they are finished");
}
TaskService::getInstance()->deleteTask($child->getId());
}
TaskService::getInstance()->deleteTask($task->getId());
}
Expand Down

0 comments on commit b9ed5a7

Please sign in to comment.