fix(TaskProcessing): Fix occ commands to cast strings to integer

fixes #57111

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2026-01-19 10:31:39 +01:00 committed by backportbot[bot]
parent d3eab5a87f
commit d019a1b597
2 changed files with 4 additions and 4 deletions

View file

@ -46,7 +46,7 @@ class Cleanup extends Base {
}
protected function execute(InputInterface $input, OutputInterface $output): int {
$maxAgeSeconds = $input->getArgument('maxAgeSeconds') ?? Manager::MAX_TASK_AGE_SECONDS;
$maxAgeSeconds = (int)($input->getArgument('maxAgeSeconds') ?? Manager::MAX_TASK_AGE_SECONDS);
$output->writeln('<comment>Cleanup up tasks older than ' . $maxAgeSeconds . ' seconds and the related output files</comment>');
$taskIdsToCleanup = [];

View file

@ -81,9 +81,9 @@ class Statistics extends Base {
$type = $input->getOption('type');
$appId = $input->getOption('appId');
$customId = $input->getOption('customId');
$status = $input->getOption('status');
$scheduledAfter = $input->getOption('scheduledAfter');
$endedBefore = $input->getOption('endedBefore');
$status = $input->getOption('status') !== null ? (int)$input->getOption('status') : null;
$scheduledAfter = $input->getOption('scheduledAfter') !== null ? (int)$input->getOption('scheduledAfter') : null;
$endedBefore = $input->getOption('endedBefore') !== null ? (int)$input->getOption('endedBefore') : null;
$tasks = $this->taskProcessingManager->getTasks($userIdFilter, $type, $appId, $customId, $status, $scheduledAfter, $endedBefore);