Skip to content

Commit 28b6c95

Browse files
committed
fix(federation): log warning when setting server status to failure due to too old job
This would've helped in debugging a problem, so here's a logging hint for next time. Signed-off-by: Pablo Zimdahl <pablo@nextcloud.com>
1 parent ce0439f commit 28b6c95

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

apps/federation/lib/BackgroundJob/GetSharedSecret.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ protected function run($argument) {
9090
// kill job after 30 days of trying
9191
$deadline = $currentTime - $this->maxLifespan;
9292
if ($created < $deadline) {
93+
$this->logger->warning("This job is too old and gets stopped now without retention. Setting server status of '{$target}' to failure.");
9394
$this->retainJob = false;
9495
$this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
9596
return;

apps/federation/lib/BackgroundJob/RequestSharedSecret.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ protected function run($argument) {
9393
// kill job after 30 days of trying
9494
$deadline = $currentTime - $this->maxLifespan;
9595
if ($created < $deadline) {
96+
$this->logger->warning("This job is too old and gets stopped now without retention. Setting server status of '{$target}' to failure.");
9697
$this->retainJob = false;
9798
$this->trustedServers->setServerStatus($target, TrustedServers::STATUS_FAILURE);
9899
return;

0 commit comments

Comments
 (0)