blob: ffa6bad533c04b63f2442480b14d430ad6121249 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
<?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]);
}
}
|