fix: audit — json try/except, ZIP-bomb drhider, classify reset only processing
Deploy contracts-flask / validate (push) Successful in 0s
Deploy contracts-flask / validate (push) Successful in 0s
This commit is contained in:
@@ -79,9 +79,10 @@ def list_pending(batch_id):
|
||||
|
||||
|
||||
def reset_classify_status(batch_id):
|
||||
"""Сбросить classify_status на 'pending' для всех документов батча (включая 'processing' — crash recovery)."""
|
||||
"""Сбросить classify_status на 'pending' только для 'processing' (crash recovery).
|
||||
Уже классифицированные ('classified', 'garbage', 'failed') НЕ трогаем."""
|
||||
return execute(
|
||||
"UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s",
|
||||
"UPDATE documents SET classify_status='pending', error_message=NULL WHERE batch_id=%s AND classify_status='processing'",
|
||||
(batch_id,),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user