Sharkey/src/queue/processors/object-storage/index.ts

15 lines
304 B
TypeScript
Raw Normal View History

2019-05-27 10:54:47 +03:00
import * as Bull from 'bull';
import deleteFile from './delete-file';
import cleanRemoteFiles from './clean-remote-files';
2019-05-27 10:54:47 +03:00
const jobs = {
deleteFile,
cleanRemoteFiles,
2019-05-27 10:54:47 +03:00
} as any;
export default function(q: Bull.Queue) {
for (const [k, v] of Object.entries(jobs)) {
q.process(k, 16, v as any);
2019-05-27 10:54:47 +03:00
}
}