feat(v1/map): stop mapping if timed out via AbortController (#1205)

This commit is contained in:
Gergő Móricz
2025-02-20 00:42:13 +01:00
committed by GitHub
parent 2200f084f3
commit 46b187bc64
13 changed files with 137 additions and 105 deletions
@@ -12,10 +12,11 @@ import { supabase_service } from "../../services/supabase";
*/
import { withAuth } from "../../lib/withAuth";
async function querySitemapIndexFunction(url: string) {
async function querySitemapIndexFunction(url: string, abort?: AbortSignal) {
const originUrl = normalizeUrlOnlyHostname(url);
for (let attempt = 1; attempt <= 3; attempt++) {
abort?.throwIfAborted();
try {
const { data, error } = await supabase_service
.from("crawl_maps")