2019-03-07 23:07:21 +09:00
|
|
|
import * as Bull from 'bull';
|
2019-02-21 01:30:21 +09:00
|
|
|
import { deleteNotes } from './delete-notes';
|
|
|
|
import { deleteDriveFiles } from './delete-drive-files';
|
2019-02-05 19:50:14 +09:00
|
|
|
import { exportNotes } from './export-notes';
|
2019-02-06 20:56:48 +09:00
|
|
|
import { exportFollowing } from './export-following';
|
|
|
|
import { exportMute } from './export-mute';
|
|
|
|
import { exportBlocking } from './export-blocking';
|
2018-03-31 19:55:00 +09:00
|
|
|
|
2019-03-07 23:07:21 +09:00
|
|
|
const jobs = {
|
2019-02-21 01:30:21 +09:00
|
|
|
deleteNotes,
|
|
|
|
deleteDriveFiles,
|
2019-02-05 19:50:14 +09:00
|
|
|
exportNotes,
|
2019-02-06 20:56:48 +09:00
|
|
|
exportFollowing,
|
|
|
|
exportMute,
|
|
|
|
exportBlocking,
|
2019-03-07 23:07:21 +09:00
|
|
|
} as any;
|
2018-03-31 19:55:00 +09:00
|
|
|
|
2019-03-07 23:07:21 +09:00
|
|
|
export default function(job: Bull.Job, done: any) {
|
|
|
|
jobs[job.data.type](job, done);
|
|
|
|
}
|