misskey/packages/backend/src/queue/processors/system/index.ts

13 lines
389 B
TypeScript
Raw Normal View History

import * as Bull from 'bull';
import { resyncCharts } from './resync-charts';
const jobs = {
resyncCharts,
2021-11-12 02:52:10 +01:00
} as Record<string, Bull.ProcessCallbackFunction<Record<string, unknown>> | Bull.ProcessPromiseFunction<Record<string, unknown>>>;
2021-11-12 02:52:10 +01:00
export default function(dbQueue: Bull.Queue<Record<string, unknown>>) {
for (const [k, v] of Object.entries(jobs)) {
dbQueue.process(k, v);
}
}