fix(backend): ロールタイムラインが保存されない問題を修正
This commit is contained in:
parent
b65fd34981
commit
ed0cc443ea
|
@ -22,7 +22,7 @@
|
||||||
-
|
-
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
-
|
- Fix: ロールタイムラインが保存されない問題を修正
|
||||||
|
|
||||||
## 2023.11.1
|
## 2023.11.1
|
||||||
|
|
||||||
|
|
|
@ -87,6 +87,9 @@ export class RoleService implements OnApplicationShutdown {
|
||||||
@Inject(DI.redis)
|
@Inject(DI.redis)
|
||||||
private redisClient: Redis.Redis,
|
private redisClient: Redis.Redis,
|
||||||
|
|
||||||
|
@Inject(DI.redisForTimelines)
|
||||||
|
private redisForTimelines: Redis.Redis,
|
||||||
|
|
||||||
@Inject(DI.redisForSub)
|
@Inject(DI.redisForSub)
|
||||||
private redisForSub: Redis.Redis,
|
private redisForSub: Redis.Redis,
|
||||||
|
|
||||||
|
@ -476,7 +479,7 @@ export class RoleService implements OnApplicationShutdown {
|
||||||
public async addNoteToRoleTimeline(note: Packed<'Note'>): Promise<void> {
|
public async addNoteToRoleTimeline(note: Packed<'Note'>): Promise<void> {
|
||||||
const roles = await this.getUserRoles(note.userId);
|
const roles = await this.getUserRoles(note.userId);
|
||||||
|
|
||||||
const redisPipeline = this.redisClient.pipeline();
|
const redisPipeline = this.redisForTimelines.pipeline();
|
||||||
|
|
||||||
for (const role of roles) {
|
for (const role of roles) {
|
||||||
this.funoutTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline);
|
this.funoutTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline);
|
||||||
|
|
Loading…
Reference in New Issue