From c06af988a766af997cefe1e7909d35efda84f5de Mon Sep 17 00:00:00 2001 From: Tobi Kremer Date: Sat, 21 Mar 2020 11:23:04 +0100 Subject: [PATCH] docs: improve documentation for getJobs() (#1468) --- REFERENCE.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/REFERENCE.md b/REFERENCE.md index b2e5ea020..49c52c0d1 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -426,7 +426,9 @@ parameter. If the specified job cannot be located, the promise will be resolved getJobs(types: string[], start?: number, end?: number, asc?: boolean): Promise ``` -Returns a promise that will return an array of job instances of the given types. Optional parameters for range and ordering are provided. +Returns a promise that will return an array of job instances of the given types. Optional parameters for range and ordering are provided. + +Note: The `start` and `end` options are applied **per job type**. For example, if there are 10 jobs in state `completed` and 10 jobs in state `active`, `getJobs(['completed', 'active'], 0, 4)` will yield an array with 10 entries, representing the first 5 completed jobs (0 - 4) and the first 5 active jobs (0 - 4). ---