2021-03-12 05:20:04 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2021-06-04 15:52:51 -04:00
|
|
|
/**
|
2024-05-27 11:39:07 -04:00
|
|
|
* SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2021-03-12 05:20:04 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCA\DAV\Command;
|
|
|
|
|
|
|
|
|
|
use OCA\DAV\CalDAV\RetentionService;
|
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
|
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
|
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
|
|
|
|
|
|
class RetentionCleanupCommand extends Command {
|
2023-07-05 10:15:43 -04:00
|
|
|
public function __construct(
|
|
|
|
|
private RetentionService $service,
|
|
|
|
|
) {
|
2021-03-12 05:20:04 -05:00
|
|
|
parent::__construct('dav:retention:clean-up');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int {
|
|
|
|
|
$this->service->cleanUp();
|
|
|
|
|
|
2023-07-05 10:15:43 -04:00
|
|
|
return self::SUCCESS;
|
2021-03-12 05:20:04 -05:00
|
|
|
}
|
|
|
|
|
}
|