Skip to content

Commit

Permalink
fix(BackgroundJob): prevent running ExpireGroupVersions job in parallel
Browse files Browse the repository at this point in the history
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Jun 21, 2024
1 parent 418c072 commit 4bfe574
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/BackgroundJob/ExpireGroupVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ class ExpireGroupVersions extends TimedJob {

public function __construct(GroupVersionsExpireManager $expireManager, ITimeFactory $timeFactory) {
parent::__construct($timeFactory);

// Run once per hour
$this->setInterval(60 * 60);
// But don't run if still running
$this->setAllowParallelRuns(false);

$this->expireManager = $expireManager;
}
Expand Down

0 comments on commit 4bfe574

Please sign in to comment.