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.8 to 0.5.9

5

History.md
0.5.9 / 2014-03-10
==================
* add job#remove method
0.5.8 / 2014-03-07

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

4

lib/job.js

@@ -140,2 +140,6 @@ var humanInterval = require('human-interval'),

Job.prototype.remove = function(cb) {
this.agenda._db.remove({_id: this.attrs._id}, cb);
};
function parsePriority(priority) {

@@ -142,0 +146,0 @@ var priorityMap = {

2

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

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

@@ -421,2 +421,12 @@ # Agenda

### remove(callback)
Removes the `job` from the database.
```js
job.save(function(err) {
if(!err) console.log("Successfully saved job to collection");
})
```
## Job Queue Events

@@ -423,0 +433,0 @@

@@ -284,2 +284,18 @@ var mongoCfg = 'localhost:27017/agenda-test',

describe('remove', function() {
it('removes the job', function(done) {
var job = new Job({agenda: jobs, name: 'removed job'});
job.save(function(err) {
if(err) return done(err);
job.remove(function(err) {
if(err) return done(err);
mongo.collection('agendaJobs').find({_id: job.attrs._id}).toArray(function(err, j) {
expect(j).to.have.length(0);
done();
});
});
});
});
});
describe('run', function() {

@@ -286,0 +302,0 @@ var job,

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