From 0675173ec23b1c3cf30da7aecaec8b4101619380 Mon Sep 17 00:00:00 2001 From: Ferdinand Gassauer Date: Thu, 12 Sep 2024 18:00:59 +0200 Subject: [PATCH] Update Runner.php to avoid "Force Quit" situation and allow the job to finish This is obviously only a quick fix for those who prefer to get most files indexed and can live with the fact that some are not. Especially many pdf's won't be indexed anyhow unless ocrmypdf is installed and working. Hetzner does not provide ocrmypdf for performance reasons. Signed-off-by: Ferdinand Gassauer --- lib/Model/Runner.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/Model/Runner.php b/lib/Model/Runner.php index 96ef545b..552aa912 100644 --- a/lib/Model/Runner.php +++ b/lib/Model/Runner.php @@ -393,12 +393,18 @@ private function updateTick(int $tick, string $action) { try { $this->runningService->update($this->tickId, $action); + $this->tickUpdate = $tick; } catch (TickIsNotAliveException $e) { - $this->output('Force Quit'); - exit(); + $this->output('No Force Quit'); + /** + * ToDo: we must collect all errors and publish the error messages once the job finishes + * to allow the admin or the user to fix the problems or accept that not all files are indexed. + * Obviously there are probably many more files not indexed if the "Force Quit" cause can not be fixed for some reason. + * exit(); + */ } - $this->tickUpdate = $tick; + }