Skip to content
Permalink
Browse files

Updated readme to document new mongo query options (#833)

* Updated readme to document new mongo query options

* Make query options clearer in documentation.
  • Loading branch information...
edwin-jones committed Jul 10, 2019
1 parent 8c3470c commit 83298d7607d322a9bcd3e654598de1885e4343af
Showing with 3 additions and 4 deletions.
  1. +3 −4 README.md
@@ -485,13 +485,12 @@ console.log('Job successfully saved');
## Managing Jobs


### jobs(mongodb-native query)
### jobs(mongodb-native query, mongodb-native sort, mongodb-native limit)

Lets you query all of the jobs in the agenda job's database. This is a full [mongodb-native](https://github.com/mongodb/node-mongodb-native)
`find` query. See mongodb-native's documentation for details.
Lets you query (then sort and limit the result) all of the jobs in the agenda job's database. These are full [mongodb-native](https://github.com/mongodb/node-mongodb-native) `find`, `sort` and `limit` commands. See mongodb-native's documentation for details.

```js
const jobs = await agenda.jobs({name: 'printAnalyticsReport'});
const jobs = await agenda.jobs({name: 'printAnalyticsReport'}, {data:-1}, 3);
// Work with jobs (see below)
```

0 comments on commit 83298d7

Please sign in to comment.
You can’t perform that action at this time.