Skip to content

Commit 85dd857

Browse files
lukasdotcomjulien-nc
authored andcommitted
Don't hide warning once it shows up
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent 9534a01 commit 85dd857

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Controller/ChattyLLMController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,8 @@ public function checkMessageGenerationTask(int $taskId, int $sessionId): JSONRes
710710
return new JSONResponse(['task_status' => $task->getstatus()], Http::STATUS_EXPECTATION_FAILED);
711711
}
712712
} elseif ($task->getstatus() === Task::STATUS_RUNNING || $task->getstatus() === Task::STATUS_SCHEDULED) {
713-
$slowPickup = $task->getstatus() === Task::STATUS_SCHEDULED && $task->getScheduledAt() + 60 * 5 < time();
713+
$startTime = $task->getStartedAt() ?? time();
714+
$slowPickup = $task->getScheduledAt() + 60 * 5 < $startTime;
714715
return new JSONResponse(['task_status' => $task->getstatus(), 'slow_pickup' => $slowPickup], Http::STATUS_EXPECTATION_FAILED);
715716
} elseif ($task->getstatus() === Task::STATUS_FAILED || $task->getstatus() === Task::STATUS_CANCELLED) {
716717
return new JSONResponse(['error' => 'task_failed_or_canceled', 'task_status' => $task->getstatus()], Http::STATUS_BAD_REQUEST);

0 commit comments

Comments
 (0)