fix(federation): reset retainJob at start of run()

Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
pull/60714/head
Git'Fellow 3 months ago
parent 8609cd45ba
commit b4992b30e8
  1. 4
      apps/federation/lib/BackgroundJob/GetSharedSecret.php
  2. 4
      apps/federation/lib/BackgroundJob/RequestSharedSecret.php

@ -74,6 +74,10 @@ class GetSharedSecret extends Job {
#[\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();

@ -87,6 +87,10 @@ class RequestSharedSecret extends Job {
*/
#[\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();

Loading…
Cancel
Save