summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-04-24 17:16:15 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-04-24 17:16:32 +0200
commit524d053eb2de5f412a65863368520719628fb002 (patch)
treefd4d7077bc00cc9331fd8aac69e3526018b444d7
parent6148c5e0a126d267cfd9aa74be29539a15b11490 (diff)
downloadnextcloud-server-524d053eb2de5f412a65863368520719628fb002.tar.gz
nextcloud-server-524d053eb2de5f412a65863368520719628fb002.zip
JobList: add debug log when hasReservedJob query fails
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
-rw-r--r--lib/private/BackgroundJob/JobList.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/BackgroundJob/JobList.php b/lib/private/BackgroundJob/JobList.php
index 3846aed3d61..fbeee1f56e9 100644
--- a/lib/private/BackgroundJob/JobList.php
+++ b/lib/private/BackgroundJob/JobList.php
@@ -39,16 +39,19 @@ use OCP\DB\Exception;
use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
use OCP\IDBConnection;
+use Psr\Log\LoggerInterface;
class JobList implements IJobList {
protected IDBConnection $connection;
protected IConfig $config;
protected ITimeFactory $timeFactory;
+ protected LoggerInterface $logger;
- public function __construct(IDBConnection $connection, IConfig $config, ITimeFactory $timeFactory) {
+ public function __construct(IDBConnection $connection, IConfig $config, ITimeFactory $timeFactory, LoggerInterface $logger) {
$this->connection = $connection;
$this->config = $config;
$this->timeFactory = $timeFactory;
+ $this->logger = $logger;
}
/**
@@ -401,6 +404,7 @@ class JobList implements IJobList {
$result->closeCursor();
return $hasReservedJobs;
} catch (Exception $e) {
+ $this->logger->debug('Querying reserved jobs failed', ['exception' => $e]);
return false;
}
}