This commit is contained in:
syuilo
2019-03-07 23:27:38 +09:00
parent d1aea7596c
commit d283ec69f7
2 changed files with 17 additions and 33 deletions

View File

@@ -15,6 +15,8 @@ const jobs = {
exportBlocking,
} as any;
export default function(job: Bull.Job, done: any) {
jobs[job.data.type](job, done);
export default function(dbQueue: Bull.Queue) {
for (const [k, v] of Object.entries(jobs)) {
dbQueue.process(k, v as any);
}
}