Fix research pipeline budget tracking
This commit is contained in:
@@ -167,7 +167,10 @@ class CrawlerManager:
|
||||
@staticmethod
|
||||
def _error_doc(url: str, error: str) -> NormalizedDocument:
|
||||
"""Create a NormalizedDocument representing an error."""
|
||||
doc = NormalizedDocument(
|
||||
# Keep the error result structurally identical to a successfully
|
||||
# normalized document. ``from_text`` hashes the (empty) content, so
|
||||
# downstream consumers can safely rely on content_hash being present.
|
||||
doc = NormalizedDocument.from_text(
|
||||
url=url,
|
||||
text="",
|
||||
title="",
|
||||
@@ -176,7 +179,6 @@ class CrawlerManager:
|
||||
"error": error,
|
||||
"content_type": "error",
|
||||
},
|
||||
content_hash="",
|
||||
extraction_tool="",
|
||||
)
|
||||
return doc
|
||||
|
||||
Reference in New Issue
Block a user