1
0

AddPreviewBackgroundCleanupJob.php 688 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Repair\NC14;
  8. use OC\Preview\BackgroundCleanupJob;
  9. use OCP\BackgroundJob\IJobList;
  10. use OCP\Migration\IOutput;
  11. use OCP\Migration\IRepairStep;
  12. class AddPreviewBackgroundCleanupJob implements IRepairStep {
  13. /** @var IJobList */
  14. private $jobList;
  15. public function __construct(IJobList $jobList) {
  16. $this->jobList = $jobList;
  17. }
  18. public function getName(): string {
  19. return 'Add preview background cleanup job';
  20. }
  21. public function run(IOutput $output) {
  22. $this->jobList->add(BackgroundCleanupJob::class);
  23. }
  24. }