Comparing version 0.8.1 to 0.9.0
@@ -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 |
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112709
2162
+ Addedes6-promise@3.0.2(transitive)
+ Addedmongodb@2.1.11(transitive)
+ Addedmongodb-core@1.3.10(transitive)
+ Addedrequire_optional@1.0.1(transitive)
+ Addedresolve-from@2.0.0(transitive)
+ Addedsemver@5.7.2(transitive)
- Removedkerberos@0.0.24(transitive)
- Removedmongodb@2.0.34(transitive)
- Removedmongodb-core@1.2.0(transitive)
- Removednan@2.10.0(transitive)
Updatedmongodb@2.1.11