Update postgres_impl.py
Browse files
lightrag/kg/postgres_impl.py
CHANGED
@@ -499,7 +499,8 @@ class PGDocStatusStorage(DocStatusStorage):
|
|
499 |
sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and status=$2"
|
500 |
params = {"workspace": self.db.workspace, "status": status.value}
|
501 |
result = await self.db.query(sql, params, True)
|
502 |
-
|
|
|
503 |
element["id"]: DocProcessingStatus(
|
504 |
content=result[0]["content"],
|
505 |
content_summary=element["content_summary"],
|
@@ -511,6 +512,8 @@ class PGDocStatusStorage(DocStatusStorage):
|
|
511 |
)
|
512 |
for element in result
|
513 |
}
|
|
|
|
|
514 |
|
515 |
async def index_done_callback(self) -> None:
|
516 |
# PG handles persistence automatically
|
|
|
499 |
sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and status=$2"
|
500 |
params = {"workspace": self.db.workspace, "status": status.value}
|
501 |
result = await self.db.query(sql, params, True)
|
502 |
+
print("")
|
503 |
+
docs_by_status = {
|
504 |
element["id"]: DocProcessingStatus(
|
505 |
content=result[0]["content"],
|
506 |
content_summary=element["content_summary"],
|
|
|
512 |
)
|
513 |
for element in result
|
514 |
}
|
515 |
+
print(f"Docs by status: {docs_by_status}")
|
516 |
+
return docs_by_status
|
517 |
|
518 |
async def index_done_callback(self) -> None:
|
519 |
# PG handles persistence automatically
|