fix: Fix logic error to make tests pass

Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
Marcel Klehr 2025-10-14 15:23:01 +02:00 committed by backportbot[bot]
parent cf90bf3da7
commit 74b7ce627c

View file

@ -38,7 +38,7 @@ class TaskProcessingSuccessRate implements ISetupCheck {
public function run(): SetupResult {
$taskCount = 0;
$lastNDays = 1;
$lastNDays = 0;
while ($taskCount === 0 && $lastNDays < self::MAX_DAYS) {
$lastNDays++;
// userId: '' means no filter, whereas null would mean guest
@ -56,7 +56,7 @@ class TaskProcessingSuccessRate implements ISetupCheck {
}
$failedCount = 0;
foreach ($tasks as $task) {
if ($task->getEndedAt() !== null) {
if ($task->getEndedAt() === null) {
continue; // task was not picked up yet
}
$status = $task->getStatus();