Add queue types (#7504)
This commit is contained in:
parent
164959a0c5
commit
591a5c277c
18 changed files with 97 additions and 50 deletions
|
|
@ -1,14 +1,15 @@
|
|||
import * as Bull from 'bull';
|
||||
import { ObjectStorageJobData } from '@/queue/types';
|
||||
import deleteFile from './delete-file';
|
||||
import cleanRemoteFiles from './clean-remote-files';
|
||||
|
||||
const jobs = {
|
||||
deleteFile,
|
||||
cleanRemoteFiles,
|
||||
} as any;
|
||||
} as Record<string, Bull.ProcessCallbackFunction<ObjectStorageJobData> | Bull.ProcessPromiseFunction<ObjectStorageJobData>>;
|
||||
|
||||
export default function(q: Bull.Queue) {
|
||||
for (const [k, v] of Object.entries(jobs)) {
|
||||
q.process(k, 16, v as any);
|
||||
q.process(k, 16, v);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue