From 51d76115a4d1917306a158a1502c62d2bfb32700 Mon Sep 17 00:00:00 2001 From: Hidekazu Kobayashi Date: Mon, 16 Sep 2024 11:43:06 +0000 Subject: [PATCH] Fix missing async/await --- packages/backend/src/core/NoteCreateService.ts | 4 ++-- .../backend/src/queue/processors/InboxProcessorService.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 31070e5f09..5221b1e2c4 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -1045,8 +1045,8 @@ export class NoteCreateService implements OnApplicationShutdown { } @bindThis - private performUpdateNotesCount(id: MiNote['id'], incrBy: number) { - this.instancesRepository.increment({ id: id }, 'notesCount', incrBy); + private async async performUpdateNotesCount(id: MiNote['id'], incrBy: number) { + await this.instancesRepository.increment({ id: id }, 'notesCount', incrBy); } @bindThis diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts index fa929a4d77..d5d0f83bfc 100644 --- a/packages/backend/src/queue/processors/InboxProcessorService.ts +++ b/packages/backend/src/queue/processors/InboxProcessorService.ts @@ -246,8 +246,8 @@ export class InboxProcessorService implements OnApplicationShutdown { } @bindThis - public performUpdateInstance(id: string, job: UpdateInstanceJob) { - this.federatedInstanceService.update(id, { + public async performUpdateInstance(id: string, job: UpdateInstanceJob) { + await this.federatedInstanceService.update(id, { latestRequestReceivedAt: new Date(), isNotResponding: false, // もしサーバーが死んでるために配信が止まっていた場合には自動的に復活させてあげる