1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 06:06:16 +02:00

fix(backend): avoid deadlock when deleting account (#16162)

This commit is contained in:
zyoshoka
2025-06-04 19:14:11 +09:00
committed by GitHub
parent b55cc03621
commit 65ba33867b
3 changed files with 6 additions and 9 deletions

View File

@@ -803,14 +803,14 @@ export class DriveService {
await Promise.all(promises);
}
this.deletePostProcess(file, isExpired, deleter);
await this.deletePostProcess(file, isExpired, deleter);
}
@bindThis
private async deletePostProcess(file: MiDriveFile, isExpired = false, deleter?: MiUser) {
// リモートファイル期限切れ削除後は直リンクにする
if (isExpired && file.userHost !== null && file.uri != null) {
this.driveFilesRepository.update(file.id, {
await this.driveFilesRepository.update(file.id, {
isLink: true,
url: file.uri,
thumbnailUrl: null,
@@ -822,7 +822,7 @@ export class DriveService {
webpublicAccessKey: 'webpublic-' + randomUUID(),
});
} else {
this.driveFilesRepository.delete(file.id);
await this.driveFilesRepository.delete(file.id);
}
this.driveChart.update(file, false);