This commit is contained in:
syuilo 2019-03-07 23:27:38 +09:00
parent d1aea7596c
commit d283ec69f7
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
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);
}
}