From 3d0117990749bebe5394ff664d62494ae9a6fa1e Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Mon, 23 May 2022 12:30:26 +0200 Subject: Add command to list jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- lib/public/BackgroundJob/IJobList.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lib/public/BackgroundJob') diff --git a/lib/public/BackgroundJob/IJobList.php b/lib/public/BackgroundJob/IJobList.php index eab37a03f36..7bc7420f35b 100644 --- a/lib/public/BackgroundJob/IJobList.php +++ b/lib/public/BackgroundJob/IJobList.php @@ -82,6 +82,15 @@ interface IJobList { */ public function getAll(); + /** + * Get jobs matching the search + * + * @param \OCP\BackgroundJob\IJob|class-string|null $job + * @return \OCP\BackgroundJob\IJob[] + * @since 25.0.0 + */ + public function getJobs($job, ?int $limit, int $offset): array; + /** * get the next job in the list * @@ -99,8 +108,6 @@ interface IJobList { public function getById($id); /** - * @param int $id - * @return array|null * @since 23.0.0 */ public function getDetailsById(int $id): ?array; @@ -108,7 +115,6 @@ interface IJobList { /** * set the job that was last ran to the current time * - * @param \OCP\BackgroundJob\IJob $job * @since 7.0.0 */ public function setLastJob(IJob $job); @@ -116,7 +122,6 @@ interface IJobList { /** * Remove the reservation for a job * - * @param IJob $job * @since 9.1.0 */ public function unlockJob(IJob $job); @@ -124,7 +129,6 @@ interface IJobList { /** * set the lastRun of $job to now * - * @param IJob $job * @since 7.0.0 */ public function setLastRun(IJob $job); @@ -132,8 +136,7 @@ interface IJobList { /** * set the run duration of $job * - * @param IJob $job - * @param $timeTaken + * @param int $timeTaken * @since 12.0.0 */ public function setExecutionTime(IJob $job, $timeTaken); @@ -141,7 +144,6 @@ interface IJobList { /** * Reset the $job so it executes on the next trigger * - * @param IJob $job * @since 23.0.0 */ public function resetBackgroundJob(IJob $job): void; -- cgit v1.2.3