Skip to content

Commit

Permalink
fix(backend): ロールタイムラインのFTLが正しいRedisサーバーに保存されない問題を修正 (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
u1-liquid authored Nov 20, 2023
1 parent 600e4fa commit c1e0647
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/backend/src/core/RoleService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ export class RoleService implements OnApplicationShutdown {
private roleAssignmentByUserIdCache: MemoryKVCache<MiRoleAssignment[]>;

constructor(
@Inject(DI.redis)
private redisClient: Redis.Redis,

@Inject(DI.redisForSub)
private redisForSub: Redis.Redis,

@Inject(DI.redisForTimelines)
private redisForTimelines: Redis.Redis,

@Inject(DI.usersRepository)
private usersRepository: UsersRepository,

Expand Down Expand Up @@ -493,7 +493,7 @@ export class RoleService implements OnApplicationShutdown {
public async addNoteToRoleTimeline(note: Packed<'Note'>): Promise<void> {
const roles = await this.getUserRoles(note.userId);

const redisPipeline = this.redisClient.pipeline();
const redisPipeline = this.redisForTimelines.pipeline();

for (const role of roles) {
this.funoutTimelineService.push(`roleTimeline:${role.id}`, note.id, 1000, redisPipeline);
Expand Down

0 comments on commit c1e0647

Please sign in to comment.