Add more things to read from replica

This commit is contained in:
Ajay
2022-07-20 01:21:13 -04:00
parent f1ed8eff84
commit dd47f87616
7 changed files with 15 additions and 14 deletions

View File

@@ -40,7 +40,7 @@ export async function getReputation(userID: UserID): Promise<number> {
SELECT * FROM "lockCategories" as l
WHERE l."videoID" = "a"."videoID" AND l."service" = "a"."service" AND l."category" = "a"."category" LIMIT 1)
THEN 1 ELSE 0 END) AS "mostUpvotedInLockedVideoSum"
FROM "sponsorTimes" as "a" WHERE "userID" = ?`, [userID, weekAgo, pastDate, userID]) as Promise<ReputationDBResult>;
FROM "sponsorTimes" as "a" WHERE "userID" = ?`, [userID, weekAgo, pastDate, userID], { useReplica: true }) as Promise<ReputationDBResult>;
const result = await QueryCacher.get(fetchFromDB, reputationKey(userID));