2018-06-13 11:43:29 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2026-02-09 04:53:58 -05:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2018-06-13 11:43:29 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-06-13 11:43:29 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Repair;
|
|
|
|
|
|
|
|
|
|
use OC\Core\BackgroundJobs\BackgroundCleanupUpdaterBackupsJob;
|
|
|
|
|
use OCP\BackgroundJob\IJobList;
|
|
|
|
|
use OCP\Migration\IOutput;
|
|
|
|
|
use OCP\Migration\IRepairStep;
|
|
|
|
|
|
|
|
|
|
class AddCleanupUpdaterBackupsJob implements IRepairStep {
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
2025-11-24 03:17:34 -05:00
|
|
|
protected readonly IJobList $jobList,
|
2025-11-17 09:32:54 -05:00
|
|
|
) {
|
2018-06-13 11:43:29 -04:00
|
|
|
}
|
|
|
|
|
|
2025-11-24 03:17:34 -05:00
|
|
|
public function getName(): string {
|
2018-06-13 11:43:29 -04:00
|
|
|
return 'Queue a one-time job to cleanup old backups of the updater';
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-24 03:17:34 -05:00
|
|
|
public function run(IOutput $output): void {
|
2018-06-13 11:43:29 -04:00
|
|
|
$this->jobList->add(BackgroundCleanupUpdaterBackupsJob::class);
|
|
|
|
|
}
|
|
|
|
|
}
|