Sharkey/src/queue/processors/db/index.ts
2019-03-12 00:34:19 +09:00

28 lines
798 B
TypeScript

import * as Bull from 'bull';
import { deleteNotes } from './delete-notes';
import { deleteDriveFiles } from './delete-drive-files';
import { exportNotes } from './export-notes';
import { exportFollowing } from './export-following';
import { exportMute } from './export-mute';
import { exportBlocking } from './export-blocking';
import { exportUserLists } from './export-user-lists';
import { importFollowing } from './import-following';
import { importUserLists } from './import-user-lists';
const jobs = {
deleteNotes,
deleteDriveFiles,
exportNotes,
exportFollowing,
exportMute,
exportBlocking,
exportUserLists,
importFollowing,
importUserLists
} as any;
export default function(dbQueue: Bull.Queue) {
for (const [k, v] of Object.entries(jobs)) {
dbQueue.process(k, v as any);
}
}