mirror of
https://git.mirrors.martin98.com/https://github.com/mendableai/firecrawl
synced 2025-08-12 18:48:59 +08:00
Nick: fixes
This commit is contained in:
parent
134de67a3b
commit
7ec278a908
@ -1,7 +1,9 @@
|
|||||||
import { supabase_rr_service, 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) {
|
import { withAuth } from "../withAuth";
|
||||||
|
|
||||||
|
async function getTeamIdSyncBOriginal(teamId: string) {
|
||||||
try {
|
try {
|
||||||
const { data, error } = await supabase_rr_service
|
const { data, error } = await supabase_rr_service
|
||||||
.from("eb-sync")
|
.from("eb-sync")
|
||||||
@ -17,3 +19,5 @@ export async function getTeamIdSyncB(teamId: string) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getTeamIdSyncB = withAuth(getTeamIdSyncBOriginal, null);
|
||||||
|
@ -79,7 +79,7 @@ async function addScrapeJobRaw(
|
|||||||
// If above by 2x, send them an email
|
// If above by 2x, send them an email
|
||||||
// No need to 2x as if there are more than the max concurrency in the concurrency queue, it is already 2x
|
// No need to 2x as if there are more than the max concurrency in the concurrency queue, it is already 2x
|
||||||
if(concurrencyQueueJobs > maxConcurrency) {
|
if(concurrencyQueueJobs > maxConcurrency) {
|
||||||
logger.info("Concurrency limited 2x (single) - ", "Concurrency queue jobs: ", concurrencyQueueJobs, "Max concurrency: ", maxConcurrency);
|
logger.info("Concurrency limited 2x (single) - ", "Concurrency queue jobs: ", concurrencyQueueJobs, "Max concurrency: ", maxConcurrency, "Team ID: ", webScraperOptions.team_id);
|
||||||
// sendNotificationWithCustomDays(webScraperOptions.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
|
// sendNotificationWithCustomDays(webScraperOptions.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
|
||||||
// logger.error("Error sending notification (concurrency limit reached): ", error);
|
// logger.error("Error sending notification (concurrency limit reached): ", error);
|
||||||
// });
|
// });
|
||||||
@ -168,7 +168,7 @@ export async function addScrapeJobs(
|
|||||||
|
|
||||||
// equals 2x the max concurrency
|
// equals 2x the max concurrency
|
||||||
if(addToCQ.length > maxConcurrency) {
|
if(addToCQ.length > maxConcurrency) {
|
||||||
logger.info("Concurrency limited 2x (multiple) - ", "Concurrency queue jobs: ", addToCQ.length, "Max concurrency: ", maxConcurrency);
|
logger.info("Concurrency limited 2x (multiple) - ", "Concurrency queue jobs: ", addToCQ.length, "Max concurrency: ", maxConcurrency, "Team ID: ", jobs[0].data.team_id);
|
||||||
// sendNotificationWithCustomDays(jobs[0].data.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
|
// sendNotificationWithCustomDays(jobs[0].data.team_id, NotificationType.CONCURRENCY_LIMIT_REACHED, 10, false).catch((error) => {
|
||||||
// logger.error("Error sending notification (concurrency limit reached): ", error);
|
// logger.error("Error sending notification (concurrency limit reached): ", error);
|
||||||
// });
|
// });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user