mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 06:59:03 +08:00
fix(auth): split load evenly between two instances
This commit is contained in:
parent
67ee2662de
commit
8620bf3d5e
@ -6,7 +6,7 @@ import {
|
||||
PlanType,
|
||||
RateLimiterMode,
|
||||
} from "../types";
|
||||
import { supabase_rr_service } from "../services/supabase";
|
||||
import { supabase_rr_service, supabase_service } from "../services/supabase";
|
||||
import { withAuth } from "../lib/withAuth";
|
||||
import { RateLimiterRedis } from "rate-limiter-flexible";
|
||||
import { sendNotification } from "../services/notification/email_notification";
|
||||
@ -100,7 +100,8 @@ export async function getACUC(
|
||||
? "auth_credit_usage_chunk_extract"
|
||||
: "auth_credit_usage_chunk_test_22_credit_pack_n_extract";
|
||||
while (retries < maxRetries) {
|
||||
({ data, error } = await supabase_rr_service.rpc(
|
||||
const client = Math.random() > 0.5 ? supabase_rr_service : supabase_service;
|
||||
({ data, error } = await client.rpc(
|
||||
rpcName,
|
||||
{ input_key: api_key },
|
||||
{ get: true },
|
||||
|
Loading…
x
Reference in New Issue
Block a user