feat: трёхэтапный фильтр мусора — этапы 1-2 (0 токенов) в classify.py

This commit is contained in:
2026-06-27 13:16:30 +04:00
parent a474b4324b
commit 909468b5b7
2 changed files with 45 additions and 1 deletions
+8
View File
@@ -53,6 +53,14 @@ def set_classify_failed(doc_id, error):
)
def set_classify_garbage(doc_id, reason=""):
"""Mark document as garbage (Stage 1-2 filter, no LLM call)."""
return execute(
"UPDATE documents SET doc_type='garbage', classify_status='garbage', error_message=%s WHERE id=%s",
(f"garbage: {reason}", doc_id),
)
def list_pending(batch_id):
"""Documents waiting for classification."""
return query(