2022-02-27 03:07:39 +01:00
|
|
|
import Bull from 'bull';
|
|
|
|
import { DbJobData } from '@/queue/types.js';
|
|
|
|
import { deleteDriveFiles } from './delete-drive-files.js';
|
|
|
|
import { exportCustomEmojis } from './export-custom-emojis.js';
|
|
|
|
import { exportNotes } from './export-notes.js';
|
|
|
|
import { exportFollowing } from './export-following.js';
|
|
|
|
import { exportMute } from './export-mute.js';
|
|
|
|
import { exportBlocking } from './export-blocking.js';
|
|
|
|
import { exportUserLists } from './export-user-lists.js';
|
|
|
|
import { importFollowing } from './import-following.js';
|
|
|
|
import { importUserLists } from './import-user-lists.js';
|
|
|
|
import { deleteAccount } from './delete-account.js';
|
|
|
|
import { importMuting } from './import-muting.js';
|
|
|
|
import { importBlocking } from './import-blocking.js';
|
|
|
|
import { importCustomEmojis } from './import-custom-emojis.js';
|
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
|
|
|
deleteDriveFiles,
|
2021-12-10 10:24:26 +01:00
|
|
|
exportCustomEmojis,
|
2019-02-05 11:50:14 +01:00
|
|
|
exportNotes,
|
2019-02-06 12:56:48 +01:00
|
|
|
exportFollowing,
|
|
|
|
exportMute,
|
|
|
|
exportBlocking,
|
2019-03-11 11:43:58 +01:00
|
|
|
exportUserLists,
|
2019-03-11 16:34:19 +01:00
|
|
|
importFollowing,
|
2021-10-19 18:11:13 +02:00
|
|
|
importMuting,
|
|
|
|
importBlocking,
|
2021-08-21 05:41:56 +02:00
|
|
|
importUserLists,
|
2022-01-12 16:47:40 +01:00
|
|
|
importCustomEmojis,
|
2021-08-21 05:41:56 +02:00
|
|
|
deleteAccount,
|
2021-05-08 11:56:21 +02:00
|
|
|
} as Record<string, Bull.ProcessCallbackFunction<DbJobData> | Bull.ProcessPromiseFunction<DbJobData>>;
|
2018-03-31 12:55:00 +02:00
|
|
|
|
2021-05-08 11:56:21 +02:00
|
|
|
export default function(dbQueue: Bull.Queue<DbJobData>) {
|
2019-03-07 15:27:38 +01:00
|
|
|
for (const [k, v] of Object.entries(jobs)) {
|
2021-05-08 11:56:21 +02:00
|
|
|
dbQueue.process(k, v);
|
2019-03-07 15:27:38 +01:00
|
|
|
}
|
2019-03-07 15:07:21 +01:00
|
|
|
}
|