nextcloud/lib/public/BackgroundJob/IJobRuns.php
Benjamin Gaussorgues e612661d71 feat(jobs): add command to list executed background jobs
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2026-05-29 13:10:15 +00:00

34 lines
717 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCP\BackgroundJob;
/**
* List executed jobs
*
* Keep track of background jobs: start time, resource used, exit status…
*
* @since 34.0.0
*/
interface IJobRuns {
/**
* List of currently running jobs
*
* @since 34.0.0
*/
public function runningJobs(int $limit = 200): \Generator;
/**
* List of completed jobs
*
* @param list<JobStatus> $statuses
* @param list<class-string<IJob>> $classes
* @since 34.0.0
*/
public function completedJobs(array $statuses = [], array $classes = [], int $limit = 200): \Generator;
}