Refactor
This commit is contained in:
parent
d1aea7596c
commit
d283ec69f7
2 changed files with 17 additions and 33 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue