Skip to content

Commit b4992b3

Browse files
committed
fix(federation): reset retainJob at start of run()
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
1 parent 8609cd4 commit b4992b3

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

apps/federation/lib/BackgroundJob/GetSharedSecret.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ protected function parentStart(IJobList $jobList): void {
7474

7575
#[\Override]
7676
protected function run($argument) {
77+
// The DI container caches this instance, so a prior invocation in the
78+
// same cron pass can leave $retainJob = true and cause this row to be
79+
// re-queued unconditionally after start() removes it.
80+
$this->retainJob = false;
7781
$target = $argument['url'];
7882
$created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime();
7983
$currentTime = $this->time->getTime();

apps/federation/lib/BackgroundJob/RequestSharedSecret.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ protected function parentStart(IJobList $jobList): void {
8787
*/
8888
#[\Override]
8989
protected function run($argument) {
90+
// The DI container caches this instance, so a prior invocation in the
91+
// same cron pass can leave $retainJob = true and cause this row to be
92+
// re-queued unconditionally after start() removes it.
93+
$this->retainJob = false;
9094
$target = $argument['url'];
9195
$created = isset($argument['created']) ? (int)$argument['created'] : $this->time->getTime();
9296
$currentTime = $this->time->getTime();

0 commit comments

Comments
 (0)