2021-08-19 21:55:45 +09:00
|
|
|
import { ObjectStorageFileJobData } from '@/queue/types';
|
2019-05-27 16:54:47 +09:00
|
|
|
import * as Bull from 'bull';
|
2021-08-19 21:55:45 +09:00
|
|
|
import { deleteObjectStorageFile } from '@/services/drive/delete-file';
|
2019-05-27 16:54:47 +09:00
|
|
|
|
2021-05-08 18:56:21 +09:00
|
|
|
export default async (job: Bull.Job<ObjectStorageFileJobData>) => {
|
2019-05-27 16:54:47 +09:00
|
|
|
const key: string = job.data.key;
|
|
|
|
|
|
2019-07-01 21:12:14 +09:00
|
|
|
await deleteObjectStorageFile(key);
|
2019-05-27 16:54:47 +09:00
|
|
|
|
|
|
|
|
return 'Success';
|
|
|
|
|
};
|