nextcloud/lib/private/Command/CronBus.php
Joas Schilling 34f1ae62a1
fix(jobs): Limit command jobs to known cases
Signed-off-by: Joas Schilling <coding@schilljs.com>
2025-11-04 11:10:40 +01:00

23 lines
472 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Command;
use OCP\BackgroundJob\IJobList;
use OCP\Command\ICommand;
class CronBus extends AsyncBus {
public function __construct(
private IJobList $jobList,
) {
}
protected function queueCommand(ICommand $command): void {
$this->jobList->add(CommandJob::class, serialize($command));
}
}