mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 12:33:09 +02:00
15 lines
466 B
TypeScript
15 lines
466 B
TypeScript
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 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);
|
|
}
|
|
}
|