From b4992b30e89f6f458eb2fb7c5ddfa306d9fcab98 Mon Sep 17 00:00:00 2001 From: Git'Fellow <12234510+solracsf@users.noreply.github.com> Date: Sun, 24 May 2026 11:28:54 +0200 Subject: [PATCH] fix(federation): reset retainJob at start of run() Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> --- apps/federation/lib/BackgroundJob/GetSharedSecret.php | 4 ++++ apps/federation/lib/BackgroundJob/RequestSharedSecret.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/apps/federation/lib/BackgroundJob/GetSharedSecret.php b/apps/federation/lib/BackgroundJob/GetSharedSecret.php index fdfa24fb5669f..089a335aae31e 100644 --- a/apps/federation/lib/BackgroundJob/GetSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/GetSharedSecret.php @@ -74,6 +74,10 @@ protected function parentStart(IJobList $jobList): void { #[\Override] protected function run($argument) { + // The DI container caches this instance, so a prior invocation in the + // same cron pass can leave $retainJob = true and cause this row to be + // re-queued unconditionally after start() removes it. + $this->retainJob = false; $target = $argument['url']; $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); $currentTime = $this->time->getTime(); diff --git a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php index 3818f9e14627c..4353bb64b6dec 100644 --- a/apps/federation/lib/BackgroundJob/RequestSharedSecret.php +++ b/apps/federation/lib/BackgroundJob/RequestSharedSecret.php @@ -87,6 +87,10 @@ protected function parentStart(IJobList $jobList): void { */ #[\Override] protected function run($argument) { + // The DI container caches this instance, so a prior invocation in the + // same cron pass can leave $retainJob = true and cause this row to be + // re-queued unconditionally after start() removes it. + $this->retainJob = false; $target = $argument['url']; $created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime(); $currentTime = $this->time->getTime();