kue-concierge
cleanup utility for kue
Last updated 5 years ago by pcothenet .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install kue-concierge 
SYNC missed versions from official npm registry.

npm version Build Status Dependency Status

kue-concierge

A utility to keep your kue tidy

Usage

var Concierge = require('kue-concierge');
var concierge = new Concierge(config, options);

Restart stuck jobs

concierge.restartStuck()

Clear complete jobs

concierge.clearExpiredByType('complete')

Clear failed jobs

concierge.clearExpiredByType('failed')

Clear all complete jobs

concierge.clearAllByType('complete')

Clear all complete jobs (above a certain number)

concierge.clearAllByType('complete', threshold)

All functions above are promises

Config

Same format as the kue.createQueue options:

{
	prefix: 'q',
	redis: {
		port: 1234,
		host: '10.0.50.20',
		auth: 'password',
		db: 3, // if provided select a non-default redis db
		options: {
			// see https://github.com/mranney/node_redis#rediscreateclient
		}
	}
}

Options

{
	maxFailedTime: 10 * 24 * 60 * 60 * 1000; // 10 days,
	maxActiveTime: 2 * 60 * 60 * 1000; // 2 hours
	maxCompleteTime: 2 * 24 * 60 * 60 * 1000; // 2 days
};

Test

npm test

Inspiration

https://github.com/Automattic/kue/issues/58

https://github.com/darielnoel/kue-cleanup

Current Tags

  • 0.3.2                                ...           latest (4 years ago)

19 Versions

  • 0.3.2                                ...           4 years ago
  • 0.3.1                                ...           4 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.5                                ...           5 years ago
  • 0.2.4                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.0.8                                ...           5 years ago
  • 0.0.7                                ...           5 years ago
  • 0.0.6                                ...           5 years ago
  • 0.0.5                                ...           5 years ago
  • 0.0.4                                ...           5 years ago
  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (4)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |