summaryrefslogtreecommitdiff
path: root/src/queue/index.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-08-21 12:41:56 +0900
committerGitHub <noreply@github.com>2021-08-21 12:41:56 +0900
commitfd1ef4a62d670aab5f0c0089ab3806639c779813 (patch)
tree0a13e5827e0a45dcc9aa592ea09a968369ff0058 /src/queue/index.ts
parentfix bug (diff)
downloadsharkey-fd1ef4a62d670aab5f0c0089ab3806639c779813.tar.gz
sharkey-fd1ef4a62d670aab5f0c0089ab3806639c779813.tar.bz2
sharkey-fd1ef4a62d670aab5f0c0089ab3806639c779813.zip
enhance(server): Use job queue for account delete (#7668)
* 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
Diffstat (limited to 'src/queue/index.ts')
-rw-r--r--src/queue/index.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/queue/index.ts b/src/queue/index.ts
index ff96c0fb15..4ca7998e61 100644
--- a/src/queue/index.ts
+++ b/src/queue/index.ts
@@ -171,6 +171,15 @@ export function createImportUserListsJob(user: ThinUser, fileId: DriveFile['id']
});
}
+export function createDeleteAccountJob(user: ThinUser) {
+ return dbQueue.add('deleteAccount', {
+ user: user
+ }, {
+ removeOnComplete: true,
+ removeOnFail: true
+ });
+}
+
export function createDeleteObjectStorageFileJob(key: string) {
return objectStorageQueue.add('deleteFile', {
key: key