From 5a149a1c3071d0ba1b7e5f37f4f20950f3f12992 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Thu, 6 Mar 2025 17:53:28 -0300 Subject: [PATCH] Revert "fix(auth): always use replica for acuc" This reverts commit 57b313608cb6e9f3c123e4754c653fef8dfacbdf. --- apps/api/src/controllers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/controllers/auth.ts b/apps/api/src/controllers/auth.ts index 03175722..f21eaf92 100644 --- a/apps/api/src/controllers/auth.ts +++ b/apps/api/src/controllers/auth.ts @@ -100,7 +100,7 @@ export async function getACUC( ? "auth_credit_usage_chunk_extract" : "auth_credit_usage_chunk_test_22_credit_pack_n_extract"; while (retries < maxRetries) { - const client = supabase_rr_service; + const client = Math.random() > 0.75 ? supabase_rr_service : supabase_service; ({ data, error } = await client.rpc( rpcName, { input_key: api_key },