mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-13 17:23:08 +02:00
fd1ef4a62d
* enhance(server): Use job queue for account delete Fix #5336 * ジョブをひとつに * remove done call * clean up * add User.isDeleted * コミット忘れ * Update 1629512953000-user-is-deleted.ts * show dialog * lint * Update 1629512953000-user-is-deleted.ts
29 lines
945 B
TypeScript
29 lines
945 B
TypeScript
import * as Bull from 'bull';
|
|
import { DbJobData } from '@/queue/types';
|
|
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';
|
|
import { deleteAccount } from './delete-account';
|
|
|
|
const jobs = {
|
|
deleteDriveFiles,
|
|
exportNotes,
|
|
exportFollowing,
|
|
exportMute,
|
|
exportBlocking,
|
|
exportUserLists,
|
|
importFollowing,
|
|
importUserLists,
|
|
deleteAccount,
|
|
} as Record<string, Bull.ProcessCallbackFunction<DbJobData> | Bull.ProcessPromiseFunction<DbJobData>>;
|
|
|
|
export default function(dbQueue: Bull.Queue<DbJobData>) {
|
|
for (const [k, v] of Object.entries(jobs)) {
|
|
dbQueue.process(k, v);
|
|
}
|
|
}
|