A utility to keep your kue tidy
var Concierge = require('kue-concierge');
var concierge = new Concierge(config, options);
concierge.restartStuck()
concierge.clearExpiredByType('complete')
concierge.clearExpiredByType('failed')
concierge.clearAllByType('complete')
concierge.clearAllByType('complete', threshold)
All functions above are promises
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
}
}
}
{
maxFailedTime: 10 * 24 * 60 * 60 * 1000; // 10 days,
maxActiveTime: 2 * 60 * 60 * 1000; // 2 hours
maxCompleteTime: 2 * 24 * 60 * 60 * 1000; // 2 days
};
npm test