diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/Command/TaskProcessing/ListCommand.php | 9 | ||||
-rw-r--r-- | core/Command/TaskProcessing/Statistics.php | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/core/Command/TaskProcessing/ListCommand.php b/core/Command/TaskProcessing/ListCommand.php index 92897c8b9ea..46f32e0bc53 100644 --- a/core/Command/TaskProcessing/ListCommand.php +++ b/core/Command/TaskProcessing/ListCommand.php @@ -36,6 +36,12 @@ class ListCommand extends Base { 'only get the tasks for one task type' ) ->addOption( + 'appId', + null, + InputOption::VALUE_OPTIONAL, + 'only get the tasks for one app ID' + ) + ->addOption( 'customId', null, InputOption::VALUE_OPTIONAL, @@ -70,12 +76,13 @@ class ListCommand extends Base { $userIdFilter = null; } $type = $input->getOption('type'); + $appId = $input->getOption('appId'); $customId = $input->getOption('customId'); $status = $input->getOption('status'); $scheduledAfter = $input->getOption('scheduledAfter'); $endedBefore = $input->getOption('endedBefore'); - $tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $customId, $status, $scheduledAfter, $endedBefore); + $tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $appId, $customId, $status, $scheduledAfter, $endedBefore); $arrayTasks = array_map(fn (Task $task): array => $task->jsonSerialize(), $tasks); $this->writeArrayInOutputFormat($input, $output, $arrayTasks); diff --git a/core/Command/TaskProcessing/Statistics.php b/core/Command/TaskProcessing/Statistics.php index 13a4c93d036..a3dc9ee0254 100644 --- a/core/Command/TaskProcessing/Statistics.php +++ b/core/Command/TaskProcessing/Statistics.php @@ -36,6 +36,12 @@ class Statistics extends Base { 'only get the tasks for one task type' ) ->addOption( + 'appId', + null, + InputOption::VALUE_OPTIONAL, + 'only get the tasks for one app ID' + ) + ->addOption( 'customId', null, InputOption::VALUE_OPTIONAL, @@ -70,12 +76,13 @@ class Statistics extends Base { $userIdFilter = null; } $type = $input->getOption('type'); + $appId = $input->getOption('appId'); $customId = $input->getOption('customId'); $status = $input->getOption('status'); $scheduledAfter = $input->getOption('scheduledAfter'); $endedBefore = $input->getOption('endedBefore'); - $tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $customId, $status, $scheduledAfter, $endedBefore); + $tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $appId, $customId, $status, $scheduledAfter, $endedBefore); $stats = ['Number of tasks' => count($tasks)]; |