diff options
Diffstat (limited to 'apps/dav/lib/Command/RetentionCleanupCommand.php')
-rw-r--r-- | apps/dav/lib/Command/RetentionCleanupCommand.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/apps/dav/lib/Command/RetentionCleanupCommand.php b/apps/dav/lib/Command/RetentionCleanupCommand.php new file mode 100644 index 00000000000..f1c941af20e --- /dev/null +++ b/apps/dav/lib/Command/RetentionCleanupCommand.php @@ -0,0 +1,28 @@ +<?php + +declare(strict_types=1); + +/** + * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ +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 { + public function __construct( + private RetentionService $service, + ) { + parent::__construct('dav:retention:clean-up'); + } + + protected function execute(InputInterface $input, OutputInterface $output): int { + $this->service->cleanUp(); + + return self::SUCCESS; + } +} |