AddLogRotateJob.php 590 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OC\Repair\NC13;
  7. use OC\Log\Rotate;
  8. use OCP\BackgroundJob\IJobList;
  9. use OCP\Migration\IOutput;
  10. use OCP\Migration\IRepairStep;
  11. class AddLogRotateJob implements IRepairStep {
  12. /** @var IJobList */
  13. private $jobList;
  14. public function __construct(IJobList $jobList) {
  15. $this->jobList = $jobList;
  16. }
  17. public function getName() {
  18. return 'Add log rotate job';
  19. }
  20. public function run(IOutput $output) {
  21. $this->jobList->add(Rotate::class);
  22. }
  23. }