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.5.6 to 0.5.7

5

History.md
0.5.7 / 2014-03-06
==================
* fix every re-running jobs out of queue at load
0.5.6 / 2014-02-18

@@ -3,0 +8,0 @@ ==================

15

lib/agenda.js

@@ -116,5 +116,14 @@ var Job = require('./job.js'),

if(props.type == 'single')
this._db.findAndModify({name: props.name, type: 'single'}, {}, {$set: props}, {upsert: true, new: true}, processDbResult);
else {
if(props.type == 'single') {
var preservedProps = {},
keep = [ 'lastRunAt', 'lastFinishedAt', 'nextRunAt', 'failReason', 'failedAt', 'lockedAt'];
keep.forEach(function(prop) {
preservedProps[prop] = props[prop];
delete props[prop];
});
this._db.findAndModify({name: props.name, type: 'single'}, {}, {$set: props, $setOnInsert: preservedProps}, {upsert: true, new: true}, processDbResult);
} else {
if(job.attrs._id) {

@@ -121,0 +130,0 @@ this._db.findAndModify({_id: job.attrs._id}, {}, {$set: props}, {new: true}, processDbResult);

2

package.json
{
"name": "agenda",
"version": "0.5.6",
"version": "0.5.7",
"description": "Light weight job scheduler for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -22,3 +22,3 @@ # Agenda

You will also need a working [mongo](http://www.mongodb.org/) database to point it to.
You will also need a working [mongo](http://www.mongodb.org/) database (2.4+) to point it to.

@@ -529,3 +529,3 @@ # Example Usage

function addJobWorker() {
webWorkers.push(cluster.fork({job: 1}).id);
jobWorkers.push(cluster.fork({job: 1}).id);
}

@@ -532,0 +532,0 @@

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