Skip to content

Commit

Permalink
docs: improve documentation for getJobs() (#1468)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulchild committed Mar 21, 2020
1 parent c61cd84 commit c06af98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion REFERENCE.md
Expand Up @@ -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<Job[]>
```

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).

---

Expand Down

0 comments on commit c06af98

Please sign in to comment.