only save to cache if success
Build and Push Docker Images / build-and-push (push) Successful in 2m10s
Build and Push Docker Images / build-and-push (push) Successful in 2m10s
This commit is contained in:
@@ -31,6 +31,7 @@ async def visit_url(url: str, skipCache: bool = False, x_api_key: Optional[str]
|
|||||||
# Call the service function
|
# Call the service function
|
||||||
result = await visit_url_service(decoded_url)
|
result = await visit_url_service(decoded_url)
|
||||||
|
|
||||||
|
if(result["status"] == "success"):
|
||||||
# Save to cache (even if we skipped reading from it)
|
# Save to cache (even if we skipped reading from it)
|
||||||
save_to_cache(decoded_url, "visit", result)
|
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)
|
result = await extract_seo_service(decoded_url)
|
||||||
|
|
||||||
# Save to cache
|
# Save to cache
|
||||||
|
if(result["status"] == "success"):
|
||||||
save_to_cache(decoded_url, "seo", result)
|
save_to_cache(decoded_url, "seo", result)
|
||||||
|
|
||||||
return 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)
|
result = await extract_meta_tags_service(decoded_url)
|
||||||
|
|
||||||
# Save to cache
|
# Save to cache
|
||||||
|
if(result["status"] == "success"):
|
||||||
save_to_cache(decoded_url, "meta", result)
|
save_to_cache(decoded_url, "meta", result)
|
||||||
|
|
||||||
return 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)
|
result = await detect_pagination_service(decoded_url)
|
||||||
|
|
||||||
# Save to cache
|
# Save to cache
|
||||||
|
if(result["status"] == "success"):
|
||||||
save_to_cache(decoded_url, "pagination", result)
|
save_to_cache(decoded_url, "pagination", result)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user