mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 04:53:08 +02:00
b9cb6d1c10
将来ESMに移行しやすいように Related: #7658 なんかmochaが起動しなくなってるけど理由不明 すぐ直したい
15 lines
475 B
TypeScript
15 lines
475 B
TypeScript
import * as Bull from 'bull';
|
|
import { ObjectStorageJobData } from '@/queue/types.js';
|
|
import deleteFile from './delete-file.js';
|
|
import cleanRemoteFiles from './clean-remote-files.js';
|
|
|
|
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);
|
|
}
|
|
}
|