Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
fix(KanaoCache): don't shift pg slaves array
Browse files Browse the repository at this point in the history
  • Loading branch information
Hazmi35 authored May 6, 2024
1 parent 99b2d38 commit f24a71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/kanao-cache/src/Structures/KanaoCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class KanaoCache extends EventEmitter {

public drizzle = withReplicas(
drizzle(this.postgresInstance.master, { schema }),
[drizzle(this.postgresInstance.slaves.shift()!, { schema }), ...this.postgresInstance.slaves.map(p => drizzle(p, { schema }))]
[drizzle(this.postgresInstance.slaves[0], { schema }), ...this.postgresInstance.slaves.slice(1).map(p => drizzle(p, { schema }))]
);

public stores = new StoreRegistry();
Expand Down

0 comments on commit f24a71b

Please sign in to comment.