perf(backend): store notes of an antenna to redis instead of postgresql
Resolve #10169
This commit is contained in:
parent
c032dd1214
commit
b53d6c7f8c
14 changed files with 64 additions and 179 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue