2017-08-24 10:06:37 -04:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2025-10-14 07:56:42 -04:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2017-08-24 10:06:37 -04:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2017 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2017-08-24 10:06:37 -04:00
|
|
|
*/
|
|
|
|
|
namespace OC\Command;
|
|
|
|
|
|
2024-02-08 05:52:40 -05:00
|
|
|
use OCP\BackgroundJob\IJobList;
|
2017-08-24 10:06:37 -04:00
|
|
|
use OCP\Command\ICommand;
|
|
|
|
|
|
|
|
|
|
class CronBus extends AsyncBus {
|
2024-02-08 05:52:40 -05:00
|
|
|
public function __construct(
|
|
|
|
|
private IJobList $jobList,
|
|
|
|
|
) {
|
2017-08-24 10:06:37 -04:00
|
|
|
}
|
|
|
|
|
|
2025-10-14 07:56:42 -04:00
|
|
|
protected function queueCommand(ICommand $command): void {
|
|
|
|
|
$this->jobList->add(CommandJob::class, serialize($command));
|
2017-08-24 10:06:37 -04:00
|
|
|
}
|
2017-09-04 08:21:44 -04:00
|
|
|
}
|