mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 03:29:01 +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";
|
import { logger } from "../logger";
|
||||||
|
|
||||||
export async function getTeamIdSyncB(teamId: string) {
|
export async function getTeamIdSyncB(teamId: string) {
|
||||||
try {
|
try {
|
||||||
const { data, error } = await supabase_service
|
const { data, error } = await supabase_rr_service
|
||||||
.from("eb-sync")
|
.from("eb-sync")
|
||||||
.select("team_id")
|
.select("team_id")
|
||||||
.eq("team_id", teamId)
|
.eq("team_id", teamId)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
|
import { AuthCreditUsageChunk } from "../../controllers/v1/types";
|
||||||
import { getACUC } from "../../controllers/auth";
|
import { getACUC } from "../../controllers/auth";
|
||||||
import { redlock } from "../redlock";
|
import { redlock } from "../redlock";
|
||||||
import { supabase_service } from "../supabase";
|
import { supabase_rr_service, supabase_service } from "../supabase";
|
||||||
import { createPaymentIntent } from "./stripe";
|
import { createPaymentIntent } from "./stripe";
|
||||||
import { issueCredits } from "./issue_credits";
|
import { issueCredits } from "./issue_credits";
|
||||||
import { sendNotification, sendNotificationWithCustomDays } from "../notification/email_notification";
|
import { sendNotification, sendNotificationWithCustomDays } from "../notification/email_notification";
|
||||||
@ -124,7 +124,7 @@ export async function autoCharge(
|
|||||||
if (chunk.sub_user_id) {
|
if (chunk.sub_user_id) {
|
||||||
// Fetch the customer's Stripe information
|
// Fetch the customer's Stripe information
|
||||||
const { data: customer, error: customersError } =
|
const { data: customer, error: customersError } =
|
||||||
await supabase_service
|
await supabase_rr_service
|
||||||
.from("customers")
|
.from("customers")
|
||||||
.select("id, stripe_customer_id")
|
.select("id, stripe_customer_id")
|
||||||
.eq("id", chunk.sub_user_id)
|
.eq("id", chunk.sub_user_id)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { logger } from "../lib/logger";
|
import { logger } from "../lib/logger";
|
||||||
import { supabase_service } from "./supabase";
|
import { supabase_rr_service, supabase_service } from "./supabase";
|
||||||
import { WebhookEventType } from "../types";
|
import { WebhookEventType } from "../types";
|
||||||
import { configDotenv } from "dotenv";
|
import { configDotenv } from "dotenv";
|
||||||
import { z } from "zod";
|
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
|
// 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
|
// and the USE_DB_AUTHENTICATION environment variable is set to true
|
||||||
if (!webhookUrl && useDbAuthentication) {
|
if (!webhookUrl && useDbAuthentication) {
|
||||||
const { data: webhooksData, error } = await supabase_service
|
const { data: webhooksData, error } = await supabase_rr_service
|
||||||
.from("webhooks")
|
.from("webhooks")
|
||||||
.select("url")
|
.select("url")
|
||||||
.eq("team_id", teamId)
|
.eq("team_id", teamId)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user