diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-03 12:11:16 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-03 12:11:16 +0900 |
| commit | b53d6c7f8ca1a712eab44967e8d05a0cc7bcc034 (patch) | |
| tree | 79ea4fe1f14c0d3c47a46705345be03a2fa2fc4b /packages/backend/src/core/NoteCreateService.ts | |
| parent | fix(frontend): tweak MkPagination behaviouyr (diff) | |
| download | sharkey-b53d6c7f8ca1a712eab44967e8d05a0cc7bcc034.tar.gz sharkey-b53d6c7f8ca1a712eab44967e8d05a0cc7bcc034.tar.bz2 sharkey-b53d6c7f8ca1a712eab44967e8d05a0cc7bcc034.zip | |
perf(backend): store notes of an antenna to redis instead of postgresql
Resolve #10169
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 93fab9d17d..7af7099432 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -326,7 +326,11 @@ export class NoteCreateService implements OnApplicationShutdown { const note = await this.insertNote(user, data, tags, emojis, mentionedUsers); if (data.channel) { - this.redisClient.xadd(`channelTimeline:${data.channel.id}`, 'MAXLEN', '~', '1000', `${this.idService.parse(note.id).date.getTime()}-*`, 'note', note.id); + this.redisClient.xadd( + `channelTimeline:${data.channel.id}`, + 'MAXLEN', '~', '1000', + `${this.idService.parse(note.id).date.getTime()}-*`, + 'note', note.id); } setImmediate('post created', { signal: this.#shutdownController.signal }).then( |