Skip to content

Instantly share code, notes, and snippets.

View MitsuhaKitsune's full-sized avatar
💭
I may be slow to respond.

Mitsuha Kitsune MitsuhaKitsune

💭
I may be slow to respond.
View GitHub Profile
@MitsuhaKitsune
MitsuhaKitsune / kue_cleanup.js
Created February 12, 2018 06:26 — forked from niravmehta/kue_cleanup.js
Cleanup script for Kue job queueing system in Node.js. Deletes failed, active and completed jobs after specified time. Can run on command line directly with "node kue_cleanup". Requires Kue installed :-)
var kue = require('kue'),
jobs = kue.createQueue(),
util = require('util'),
noop = function() {};
jobs.CLEANUP_MAX_FAILED_TIME = 30 * 24 * 60 * 60 * 1000; // 30 days
jobs.CLEANUP_MAX_ACTIVE_TIME = 1 * 24 * 60 * 60 * 1000; // 1 day
jobs.CLEANUP_MAX_COMPLETE_TIME = 5 * 24 * 60 * 60 * 1000; // 5 days
jobs.CLEANUP_INTERVAL = 5 * 60 * 1000; // 5 minutes
@MitsuhaKitsune
MitsuhaKitsune / models-locale.js
Created February 8, 2018 04:22 — forked from albertosouza/models-locale.js
Sails.js simple example of localization with database
module.exports = {
adapter:'exampleDB',
//tableName:'locale',
attributes: {
text: {
type: 'string'
},
// locale config