Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agenda

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agenda - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

4

History.md

@@ -0,1 +1,5 @@

0.9.0 / 2016-08-13
==================
* Upgrade mongo driver to 2.1.11
* Increase Mongo compatability to 2.4

@@ -2,0 +6,0 @@ 0.8.1 / 2016-05-08

29

lib/agenda.js

@@ -110,12 +110,27 @@ /* Code forked from https://github.com/rschmukler/agenda

function( err, result ){
if (err) {
self.emit('error', err);
} else {
self.emit('ready');
}
if (cb) cb(err, self._collection);
handleLegacyCreateIndex(err, result, self, cb)
});
};
function handleLegacyCreateIndex(err, result, self, cb){
if(err && err.message !== 'no such cmd: createIndexes'){
self.emit('error', err);
} else {
// Looks like a mongo.version < 2.4.x
err = null;
self._collection.ensureIndex(
{"name": 1, "priority": -1, "lockedAt": 1, "nextRunAt": 1, "disabled": 1},
{name: "findAndLockNextJobIndex1"}
);
self._collection.ensureIndex(
{"name": 1, "lockedAt": 1, "priority": -1, "nextRunAt": 1, "disabled": 1},
{name: "findAndLockNextJobIndex2"}
);
self.emit('ready');
}
if (cb){
cb(err, self._collection);
}
}
Agenda.prototype.name = function(name) {

@@ -122,0 +137,0 @@ this._name = name;

{
"name": "agenda",
"version": "0.8.1",
"version": "0.9.0",
"description": "Light weight job scheduler for Node.js",

@@ -35,3 +35,3 @@ "main": "index.js",

"moment-timezone": "^0.5.0",
"mongodb": "2.0.34"
"mongodb": "2.1.11"
},

@@ -38,0 +38,0 @@ "devDependencies": {

@@ -40,3 +40,3 @@ # Agenda

// or pass additional connection options:
// var agenda = new Agenda({db: {address: mongoConnectionString, collection: "jobCollectionName", options: {server:{auto_reconnect:true}}});
// var agenda = new Agenda({db: {address: mongoConnectionString, collection: "jobCollectionName", options: {server:{auto_reconnect:true}}}});

@@ -43,0 +43,0 @@ // or pass in an existing mongodb-native MongoClient instance

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc