agenda v3.1.0 Release Notes

Release Date: 2020-04-07 // over 1 year ago
  • Stay safe!

    • ๐Ÿ›  Fix for skipImmediate resetting nextRunAt to current date (#860) (Thanks @AshlinDuncan!)
    • ๐Ÿ›  Fix deprecated reconnect options (#948) (Thanks @ekegodigital!)
    • โž• Add ability to set a skip when querying jobs. (#898) (Thanks @cjolif!)

    Internal:

    • ๐Ÿ›  Fixed deprecated MongoDB functions in tests (#928) (Thanks @MichielDeMey!)
    • โšก๏ธ Updated devDependencies

    ๐Ÿš€ Thank you @koresar, @sampathBlam, and @MichielDeMey helping to review PRs for this release! ๐Ÿ‘


Previous changes from v3.0.0

    • ๐Ÿ‘Œ Support MongoDB's Unified Topology Design (#921) (Thanks @viktorzavadil!)
    • ๐Ÿ›  Fix: check that the new nextRunAt is different that the previous nextRunAt (#863) (Thanks @RaphaelRheault!)
    • โšก๏ธ Update dependencies. Most notably MongoDB driver 3.4 โ†’ 3.5 (#899, #900, #903, #906, #908, #910, #912, #913, #920, #922)
    • ๐Ÿ“š Documentation updates, thanks @MichielDeMey and @Sunghee2. (#923 & #907)

    ๐Ÿ’ฅ BREAKING

    • โœ… Stop testing for Node.js 8. This might still work but we're no longer actively testing for it. (#925)

    # 2.3.0 / 2019-12-16

    • ๐Ÿ‘Œ Improved performance in situations when there are many "expired" jobs in the database (#869) (Thanks @mfred488!)
    • ๐Ÿ›  Fix periodic node.js process unhandledRejection (#887) (Thanks @koresar and @Scorpil)
    • โšก๏ธ Update dependencies

    # 2.2.0 / 2019-11-24

    • Fix skipImmediate option in .every (#861) (Thanks @erics2783!)
    • Add try/catch block to agenda#now method (#876) (Thanks @sampathBlam!)
    • Refactor job queuing mechanism. Agenda n ow guarantees priority when executing jobs scheduled the same datetime. Fixes also some tests. (#852) (Thank you @dmbarreiro!)
    • Update dependencies (Kudos @simison!) Most notably mongodb ~3.2.7 -> ~3.3.0 (changelog) โ€” highlights:
      • Mongo DB Server Version 4.2 feature support
      • Merged mongodb-core into node-mongodb-native
      • Beta support for MongoDB Client-Side Encryption
      • SRV Polling for Sharded Clusters
    • Updates to documentation (Thank you @lautarobock, @sampathBlam, @indatawetrust)

    # 2.1.0 / 2019-09-09

    • Support async functions in job processing (#653) (thanks @princjef!)
    • Allow sorting and limiting jobs when searching (#665) (thank you @edwin-jones)
    • Update MongoClient connection settings with useNewUrlParser: true to remove the deprecation warning. (#806) (thanks @dpawson905!)
    • Allow valid date strings when scheduling (#808) (Thanks @wingsbob!)
    • Update dependencies (#820)
    • Update documentation (kudos @dandv, @pedruino and many others!)
    • Fix linting errors (#847) (thanks @dmbarreiro!)

    # 2.0.2 / 2018-09-15

    • Fixes a MongoDB connection string issue with Atlas (#674

    # 2.0.1 / 2018-08-30

    • Fix a bug where job.touch() wasn't promise based, as it should've been (#667

    # 2.0.0 / 2018-07-19

    • 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