diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-05-23 12:30:26 +0200 |
---|---|---|
committer | Côme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com> | 2022-07-11 09:46:23 +0000 |
commit | 3d0117990749bebe5394ff664d62494ae9a6fa1e (patch) | |
tree | 0eafa0b6fcc4d8d15654254ddd03db5209842996 /lib/public/BackgroundJob | |
parent | 0b7779b6ff7dcb603d1088f3ea8fbf42ce5a98c4 (diff) | |
download | nextcloud-server-3d0117990749bebe5394ff664d62494ae9a6fa1e.tar.gz nextcloud-server-3d0117990749bebe5394ff664d62494ae9a6fa1e.zip |
Add command to list jobs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public/BackgroundJob')
-rw-r--r-- | lib/public/BackgroundJob/IJobList.php | 18 |
1 files changed, 10 insertions, 8 deletions
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 @@ -83,6 +83,15 @@ interface IJobList { public function getAll(); /** + * Get jobs matching the search + * + * @param \OCP\BackgroundJob\IJob|class-string<IJob>|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 * * @param bool $onlyTimeSensitive @@ -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; |