2018-05-08 08:47:50 -04:00
|
|
|
<?php
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-05-08 08:47:50 -04:00
|
|
|
declare(strict_types=1);
|
2019-12-03 13:57:53 -05:00
|
|
|
|
2018-05-08 08:47:50 -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-05-08 08:47:50 -04:00
|
|
|
*/
|
2026-05-28 08:54:31 -04:00
|
|
|
|
2018-05-08 08:47:50 -04:00
|
|
|
namespace OC\Repair\NC14;
|
|
|
|
|
|
|
|
|
|
use OC\Preview\BackgroundCleanupJob;
|
|
|
|
|
use OCP\BackgroundJob\IJobList;
|
|
|
|
|
use OCP\Migration\IOutput;
|
|
|
|
|
use OCP\Migration\IRepairStep;
|
|
|
|
|
|
|
|
|
|
class AddPreviewBackgroundCleanupJob implements IRepairStep {
|
2025-11-17 09:32:54 -05:00
|
|
|
public function __construct(
|
2025-11-24 03:17:34 -05:00
|
|
|
private readonly IJobList $jobList,
|
2025-11-17 09:32:54 -05:00
|
|
|
) {
|
2018-05-08 08:47:50 -04:00
|
|
|
}
|
|
|
|
|
|
2026-04-28 13:36:04 -04:00
|
|
|
#[\Override]
|
2018-05-08 08:47:50 -04:00
|
|
|
public function getName(): string {
|
|
|
|
|
return 'Add preview background cleanup job';
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-28 13:36:04 -04:00
|
|
|
#[\Override]
|
2018-05-08 08:47:50 -04:00
|
|
|
public function run(IOutput $output) {
|
|
|
|
|
$this->jobList->add(BackgroundCleanupJob::class);
|
|
|
|
|
}
|
|
|
|
|
}
|