only save to cache if success
Build and Push Docker Images / build-and-push (push) Successful in 2m10s

This commit is contained in:
2025-07-07 13:46:56 +02:00
parent 1950976e6d
commit 8bad7b41ec
@@ -31,6 +31,7 @@ async def visit_url(url: str, skipCache: bool = False, x_api_key: Optional[str]
# Call the service function
result = await visit_url_service(decoded_url)
if(result["status"] == "success"):
# Save to cache (even if we skipped reading from it)
save_to_cache(decoded_url, "visit", result)
@@ -60,6 +61,7 @@ async def extract_seo(url: str, skipCache: bool = False, x_api_key: Optional[str
result = await extract_seo_service(decoded_url)
# Save to cache
if(result["status"] == "success"):
save_to_cache(decoded_url, "seo", result)
return result
@@ -87,6 +89,7 @@ async def extract_meta_tags(url: str, skipCache: bool = False, x_api_key: Option
result = await extract_meta_tags_service(decoded_url)
# Save to cache
if(result["status"] == "success"):
save_to_cache(decoded_url, "meta", result)
return result
@@ -114,6 +117,7 @@ async def detect_pagination(url: str, skipCache: bool = False, x_api_key: Option
result = await detect_pagination_service(decoded_url)
# Save to cache
if(result["status"] == "success"):
save_to_cache(decoded_url, "pagination", result)
return result