Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-05-23 13:30:26 +0300
committerCôme Chilliet (Rebase PR Action) <come-nc@users.noreply.github.com>2022-07-11 12:46:23 +0300
commit3d0117990749bebe5394ff664d62494ae9a6fa1e (patch)
tree0eafa0b6fcc4d8d15654254ddd03db5209842996 /lib/public
parent0b7779b6ff7dcb603d1088f3ea8fbf42ce5a98c4 (diff)
Add command to list jobs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/BackgroundJob/IJobList.php18
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;