Skip to content

Commit

Permalink
chore(backend): ノートを受信した際に遅延時間をログ出力するように
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Dec 27, 2024
1 parent 92e03ca commit 8bc83f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/backend/src/core/NoteCreateService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ export class NoteCreateService implements OnApplicationShutdown {
throw new IdentifiableError('9f466dab-c856-48cd-9e65-ff90ff750580', 'Note contains too many mentions');
}

const delay = Date.now() - data.createdAt.getTime();
this.logger.info(`Note Received delay: ${delay}ms, host: ${user.host}`);

const note = await this.insertNote(user, data, tags, emojis, mentionedUsers);

setImmediate('post created', { signal: this.#shutdownController.signal }).then(
Expand Down

0 comments on commit 8bc83f3

Please sign in to comment.