From d292c30eb3118a35ef0799021aeafbd3137ef166 Mon Sep 17 00:00:00 2001 From: Severin Hamader Date: Wed, 1 Oct 2025 18:25:28 +0200 Subject: [PATCH] add log informing user of intentional delay in job execution Signed-off-by: Severin Hamader --- lib/Service/GoogleDriveAPIService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Service/GoogleDriveAPIService.php b/lib/Service/GoogleDriveAPIService.php index 23ec2c60..59716eda 100644 --- a/lib/Service/GoogleDriveAPIService.php +++ b/lib/Service/GoogleDriveAPIService.php @@ -155,6 +155,7 @@ public function importDriveJob(string $userId): void { if ($jobRunning) { $lastJobStart = $this->config->getUserValue($userId, Application::APP_ID, 'drive_import_job_last_start'); if ($lastJobStart !== '' && ($nowTs - intval($lastJobStart) < Application::IMPORT_JOB_TIMEOUT)) { + $this->logger->info('Last job execution (' . strval($nowTs - intval($lastJobStart)) . ') is less than ' . strval(Application::IMPORT_JOB_TIMEOUT) . ' seconds ago, delaying execution'); // last job has started less than an hour ago => we consider it can still be running $this->jobList->add(ImportDriveJob::class, ['user_id' => $userId]); return;