mirror of https://gitgud.io/fatchan/jschan.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
283 B
16 lines
283 B
5 years ago
|
'use strict';
|
||
5 years ago
|
|
||
5 years ago
|
const Queue = require('bull')
|
||
4 years ago
|
, { redis } = require(__dirname+'/configs/secrets.js')
|
||
4 years ago
|
, taskQueue = new Queue('task', { redis });
|
||
5 years ago
|
|
||
5 years ago
|
module.exports = {
|
||
|
|
||
5 years ago
|
queue: taskQueue,
|
||
5 years ago
|
|
||
5 years ago
|
push: (data, options) => {
|
||
|
taskQueue.add(data, { ...options, removeOnComplete: true});
|
||
5 years ago
|
}
|
||
|
|
||
5 years ago
|
}
|