Simplify warning message format for document deletion
This commit is contained in:
parent
9cc9d62c89
commit
1941df9cf6
1 changed files with 4 additions and 4 deletions
|
|
@ -2179,13 +2179,13 @@ class LightRAG:
|
||||||
doc_status = doc_status_data.get("status")
|
doc_status = doc_status_data.get("status")
|
||||||
if doc_status != DocStatus.PROCESSED:
|
if doc_status != DocStatus.PROCESSED:
|
||||||
if doc_status == DocStatus.PENDING:
|
if doc_status == DocStatus.PENDING:
|
||||||
warning_msg = f"WARNING: Deleting {doc_id} ('{file_path}') - previous status: PENDING"
|
warning_msg = f"WARNING: Deleting {doc_id} {file_path}(previous status: PENDING)"
|
||||||
elif doc_status == DocStatus.PROCESSING:
|
elif doc_status == DocStatus.PROCESSING:
|
||||||
warning_msg = f"WARNING: Deleting {doc_id} ('{file_path}') - previous status: PROCESSING"
|
warning_msg = f"WARNING: Deleting {doc_id} {file_path}(previous status: PROCESSING)"
|
||||||
elif doc_status == DocStatus.FAILED:
|
elif doc_status == DocStatus.FAILED:
|
||||||
warning_msg = f"WARNING: Deleting {doc_id} ('{file_path}') - previous status: FAILED"
|
warning_msg = f"WARNING: Deleting {doc_id} {file_path}(previous status: FAILED)"
|
||||||
else:
|
else:
|
||||||
warning_msg = f"WARNING: Deleting {doc_id} ('{file_path}') - previous status: {doc_status.value}"
|
warning_msg = f"WARNING: Deleting {doc_id} {file_path}(previous status: {doc_status.value})"
|
||||||
|
|
||||||
logger.warning(warning_msg)
|
logger.warning(warning_msg)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue