mirror of
https://github.com/HKUDS/LightRAG.git
synced 2025-09-26 16:47:01 +00:00
Update postgres_impl.py
This commit is contained in:
parent
941c89521c
commit
a15d164d87
@ -499,7 +499,8 @@ class PGDocStatusStorage(DocStatusStorage):
|
|||||||
sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and status=$2"
|
sql = "select * from LIGHTRAG_DOC_STATUS where workspace=$1 and status=$2"
|
||||||
params = {"workspace": self.db.workspace, "status": status.value}
|
params = {"workspace": self.db.workspace, "status": status.value}
|
||||||
result = await self.db.query(sql, params, True)
|
result = await self.db.query(sql, params, True)
|
||||||
return {
|
print("")
|
||||||
|
docs_by_status = {
|
||||||
element["id"]: DocProcessingStatus(
|
element["id"]: DocProcessingStatus(
|
||||||
content=result[0]["content"],
|
content=result[0]["content"],
|
||||||
content_summary=element["content_summary"],
|
content_summary=element["content_summary"],
|
||||||
@ -511,6 +512,8 @@ class PGDocStatusStorage(DocStatusStorage):
|
|||||||
)
|
)
|
||||||
for element in result
|
for element in result
|
||||||
}
|
}
|
||||||
|
print(f"Docs by status: {docs_by_status}")
|
||||||
|
return docs_by_status
|
||||||
|
|
||||||
async def index_done_callback(self) -> None:
|
async def index_done_callback(self) -> None:
|
||||||
# PG handles persistence automatically
|
# PG handles persistence automatically
|
||||||
|
Loading…
x
Reference in New Issue
Block a user