0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-20 13:10:13 +00:00
nextcloud_server/apps/dav/lib/Upload/CleanupService.php
provokateurin 8813df9623
refactor(dav): Pass UID from UploadHome to UploadFolder and CleanupService
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-05 13:23:11 +02:00

27 lines
644 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\DAV\Upload;
use OCA\DAV\BackgroundJob\UploadCleanup;
use OCP\BackgroundJob\IJobList;
class CleanupService {
public function __construct(
private IJobList $jobList,
) {
}
public function addJob(string $uid, string $folder) {
$this->jobList->add(UploadCleanup::class, ['uid' => $uid, 'folder' => $folder]);
}
public function removeJob(string $uid, string $folder) {
$this->jobList->remove(UploadCleanup::class, ['uid' => $uid, 'folder' => $folder]);
}
}