v1.0.174: reset/list_pending без фильтра status=parsed
This commit is contained in:
@@ -56,7 +56,7 @@ def set_classify_failed(doc_id, error):
|
||||
def list_pending(batch_id):
|
||||
"""Documents waiting for classification."""
|
||||
return query(
|
||||
"SELECT id, filename, elements_json FROM documents WHERE batch_id=%s AND classify_status='pending' AND status='parsed'",
|
||||
"SELECT id, filename, elements_json FROM documents WHERE batch_id=%s AND classify_status='pending'",
|
||||
(batch_id,),
|
||||
)
|
||||
|
||||
@@ -64,7 +64,7 @@ def list_pending(batch_id):
|
||||
def reset_classify_status(batch_id):
|
||||
"""Сбросить classify_status на 'pending' для всех документов батча."""
|
||||
return execute(
|
||||
"UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s AND status='parsed'",
|
||||
"UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s",
|
||||
(batch_id,),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user