Skip to content

Commit

Permalink
Update History.md with details about Promises
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Jun 9, 2018
1 parent b9ecca9 commit 36f8d85
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion History.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,12 +5,50 @@ Next
* Code cleanup ([#503](https://github.com/agenda/agenda/pull/503)) * Code cleanup ([#503](https://github.com/agenda/agenda/pull/503))
* Ensure tests pass for Node.js version 10 [#608](https://github.com/agenda/agenda/pull/608)) * Ensure tests pass for Node.js version 10 [#608](https://github.com/agenda/agenda/pull/608))
* Add `skipImmediate` to `repeatEvery()` options to skip immediate run of repeated jobs when Agenda starts. See [documentation](https://github.com/agenda/agenda/blob/202c9e95b40115dc763641f55180db9a4f358272/README.md#repeateveryinterval-options) ([#594](https://github.com/agenda/agenda/pull/594)) * Add `skipImmediate` to `repeatEvery()` options to skip immediate run of repeated jobs when Agenda starts. See [documentation](https://github.com/agenda/agenda/blob/202c9e95b40115dc763641f55180db9a4f358272/README.md#repeateveryinterval-options) ([#594](https://github.com/agenda/agenda/pull/594))
* Fixes some flaky tests
* Adds docs generator (`npm run docs` to generate `/docs`)


BREAKING BREAKING
-------- --------
* Promises rewrite ([#557](https://github.com/agenda/agenda/pull/557)) * Rewrite Agenda API support promises! ([#557](https://github.com/agenda/agenda/pull/557))

No more callbacks! Instead of:

```js
function graceful() {
agenda.stop(function() {
process.exit(0);
});
}
```

You need to:
```js
async function graceful() {
await agenda.stop();
process.exit(0);
}
```

You don't anymore have to listen for `start` event. Instead you can do:
```js
await agenda.start();
agenda.every('10 minutes', 'example');
```
However, this will still work:
```js
agenda.on('ready', function () {
agenda.every('10 minutes', 'example');
agenda.start();
});
```
See the documentation for more!
* Drop support for Node.js versions 4, 5 and 6 ([#557](https://github.com/agenda/agenda/pull/557) / [#608](https://github.com/agenda/agenda/pull/608)) * Drop support for Node.js versions 4, 5 and 6 ([#557](https://github.com/agenda/agenda/pull/557) / [#608](https://github.com/agenda/agenda/pull/608))
* Drop support for MongoDB 2.4 ([#497](https://github.com/agenda/agenda/pull/497)) * Drop support for MongoDB 2.4 ([#497](https://github.com/agenda/agenda/pull/497))
* Jobs _emit_ errors instead of throwing them
1.0.3 / 2017-10-17 1.0.3 / 2017-10-17
================== ==================
Expand Down

0 comments on commit 36f8d85

Please sign in to comment.