agenda v2.0.0 Release Notes

Release Date: 2018-07-19 // almost 6 years ago
    • Rewrite tests: replace mocha and blanket with ava and nyc (#506)
    • Optimization: don't try and unlock jobs when _lockedJobs is empty (#509)
    • Code cleanup (#503)
    • Ensure tests pass for Node.js version 10 #608)
    • Add skipImmediate to repeatEvery() options to skip immediate run of repeated jobs when Agenda starts. See documentation (#594)
    • Fixes some flaky tests
    • Adds docs generator (npm run docs to generate /docs)

    💥 BREAKING

    • Rewrite Agenda API support promises! (#557)

      No more callbacks! Instead of:

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

      You need to:

      async function graceful() {
        await agenda.stop();
        process.exit(0);
      }
      

      You don't anymore have to listen for start event. Instead you can do:

      await agenda.start();
      agenda.every('10 minutes', 'example');
      

      However, this will still work:

      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 / #608)

    • Drop support for MongoDB 2.4 (#497)

    • Update Native MongoDB driver to 3.1 from 2.2 (#616)

    • Jobs emit errors instead of throwing them