mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-11 20:58:59 +08:00
Nick: more read replicas
This commit is contained in:
parent
949fb68bdd
commit
783fad90dd
@ -1,9 +1,9 @@
|
||||
import { supabase_service } from "../../services/supabase";
|
||||
import { supabase_rr_service, supabase_service } from "../../services/supabase";
|
||||
import { logger } from "../logger";
|
||||
|
||||
export async function getTeamIdSyncB(teamId: string) {
|
||||
try {
|
||||
const { data, error } = await supabase_service
|
||||
const { data, error } = await supabase_rr_service
|
||||
.from("eb-sync")
|
||||
.select("team_id")
|
||||
.eq("team_id", teamId)
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
|
||||
import { getACUC } from "../../controllers/auth";
|
||||
import { redlock } from "../redlock";
|
||||
import { supabase_service } from "../supabase";
|
||||
import { supabase_rr_service, supabase_service } from "../supabase";
|
||||
import { createPaymentIntent } from "./stripe";
|
||||
import { issueCredits } from "./issue_credits";
|
||||
import { sendNotification, sendNotificationWithCustomDays } from "../notification/email_notification";
|
||||
@ -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_service
|
||||
await supabase_rr_service
|
||||
.from("customers")
|
||||
.select("id, stripe_customer_id")
|
||||
.eq("id", chunk.sub_user_id)
|
||||
|
@ -1,6 +1,6 @@
|
||||
import axios from "axios";
|
||||
import { logger } from "../lib/logger";
|
||||
import { supabase_service } from "./supabase";
|
||||
import { supabase_rr_service, supabase_service } from "./supabase";
|
||||
import { WebhookEventType } from "../types";
|
||||
import { configDotenv } from "dotenv";
|
||||
import { z } from "zod";
|
||||
@ -36,7 +36,7 @@ export const callWebhook = async (
|
||||
// Only fetch the webhook URL from the database if the self-hosted webhook URL and specified webhook are not set
|
||||
// and the USE_DB_AUTHENTICATION environment variable is set to true
|
||||
if (!webhookUrl && useDbAuthentication) {
|
||||
const { data: webhooksData, error } = await supabase_service
|
||||
const { data: webhooksData, error } = await supabase_rr_service
|
||||
.from("webhooks")
|
||||
.select("url")
|
||||
.eq("team_id", teamId)
|
||||
|
Loading…
x
Reference in New Issue
Block a user