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.7 to 0.5.8

5

History.md
0.5.8 / 2014-03-07
==================
* Fixed single jobs not being saved properly [closes #38]
0.5.7 / 2014-03-06

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

18

lib/agenda.js

@@ -112,3 +112,4 @@ var Job = require('./job.js'),

var props = job.toJSON();
var props = job.toJSON(),
newOrUnloaded = typeof props._id == 'undefined';

@@ -119,10 +120,11 @@ delete props._id;

if(props.type == 'single') {
var preservedProps = {},
keep = [ 'lastRunAt', 'lastFinishedAt', 'nextRunAt', 'failReason', 'failedAt', 'lockedAt'];
var preservedProps = {};
keep.forEach(function(prop) {
preservedProps[prop] = props[prop];
delete props[prop];
});
if(newOrUnloaded) {
var 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);

@@ -129,0 +131,0 @@ } else {

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

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

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