2019-03-07 15:07:21 +01:00
|
|
|
import * as Bull from 'bull';
|
2019-02-20 17:30:21 +01:00
|
|
|
import { deleteNotes } from './delete-notes';
|
|
|
|
import { deleteDriveFiles } from './delete-drive-files';
|
2019-02-05 11:50:14 +01:00
|
|
|
import { exportNotes } from './export-notes';
|
2019-02-06 12:56:48 +01:00
|
|
|
import { exportFollowing } from './export-following';
|
|
|
|
import { exportMute } from './export-mute';
|
|
|
|
import { exportBlocking } from './export-blocking';
|
2018-03-31 12:55:00 +02:00
|
|
|
|
2019-03-07 15:07:21 +01:00
|
|
|
const jobs = {
|
2019-02-20 17:30:21 +01:00
|
|
|
deleteNotes,
|
|
|
|
deleteDriveFiles,
|
2019-02-05 11:50:14 +01:00
|
|
|
exportNotes,
|
2019-02-06 12:56:48 +01:00
|
|
|
exportFollowing,
|
|
|
|
exportMute,
|
|
|
|
exportBlocking,
|
2019-03-07 15:07:21 +01:00
|
|
|
} as any;
|
2018-03-31 12:55:00 +02:00
|
|
|
|
2019-03-07 15:27:38 +01:00
|
|
|
export default function(dbQueue: Bull.Queue) {
|
|
|
|
for (const [k, v] of Object.entries(jobs)) {
|
|
|
|
dbQueue.process(k, v as any);
|
|
|
|
}
|
2019-03-07 15:07:21 +01:00
|
|
|
}
|