temp: move more to main instance

This commit is contained in:
Gergő Móricz 2025-03-29 18:18:55 +01:00
parent 4f0510e71d
commit b9dde3fc3d
4 changed files with 4 additions and 5 deletions

View File

@ -97,8 +97,7 @@ export async function getACUC(
mode === RateLimiterMode.Extract ||
mode === RateLimiterMode.ExtractStatus;
while (retries < maxRetries) {
const client =
Math.random() > (2/3) ? supabase_rr_service : supabase_service;
const client = supabase_service;
({ data, error } = await client.rpc(
"auth_credit_usage_chunk_26_tally",
{ input_key: api_key, i_is_extract: isExtract, tally_untallied_credits: true },

View File

@ -246,7 +246,7 @@ export async function crawlStatusController(
let totalCount = jobIDs.length;
if (totalCount === 0 && process.env.USE_DB_AUTHENTICATION === "true") {
const x = await supabase_rr_service
const x = await supabase_service
.from('firecrawl_jobs')
.select('*', { count: 'exact', head: true })
.eq("crawl_id", req.params.jobId)

View File

@ -124,7 +124,7 @@ export async function autoCharge(
if (chunk.sub_user_id) {
// Fetch the customer's Stripe information
const { data: customer, error: customersError } =
await supabase_rr_service
await supabase_service
.from("customers")
.select("id, stripe_customer_id")
.eq("id", chunk.sub_user_id)

View File

@ -18,7 +18,7 @@ export async function validateIdempotencyKey(req: Request): Promise<boolean> {
return false;
}
const { data, error } = await supabase_rr_service
const { data, error } = await supabase_service
.from("idempotency_keys")
.select("key")
.eq("key", idempotencyKey);