Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions apps/theming/lib/Jobs/MigrateBackgroundImages.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ public function __construct(
}

protected function run($argument): void {
if (!isset($argument['stage'])) {
// not executed in 25.0.0?!
$argument['stage'] = self::STAGE_PREPARE;
if (!is_array($argument) || !isset($argument['stage'])) {
throw new \Exception('Job '.self::class.' called with wrong argument');
}

switch ($argument['stage']) {
Expand Down Expand Up @@ -99,10 +98,10 @@ protected function runPreparation(): void {
$userIds = $result->fetchAll(\PDO::FETCH_COLUMN);
$this->storeUserIdsToProcess($userIds);
} catch (\Throwable $t) {
$this->jobList->add(self::class, self::STAGE_PREPARE);
$this->jobList->add(self::class, ['stage' => self::STAGE_PREPARE]);
throw $t;
}
$this->jobList->add(self::class, self::STAGE_EXECUTE);
$this->jobList->add(self::class, ['stage' => self::STAGE_EXECUTE]);
}

/**
Expand Down