mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 08:17:34 +00:00
feat: harden webtool
This commit is contained in:
1 parent
3cbd284948
commit
64b3bd3356
20 files changed
+939
-80
No files matched your search
@@ -182,6 +182,16 @@ class TestStoreAttachmentTask:
|
||||
mock_worker.assert_called_once_with(ANY, {"file": "info"}, "user1")
|
||||
assert result == {"status": "ok"}
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_data_errors_are_not_autoretried(self):
|
||||
# A DataError is deterministic (poison payload) — retrying it five
|
||||
# times just multiplies log noise for the same terminal failure.
|
||||
from sqlalchemy.exc import DataError
|
||||
|
||||
from application.api.user.tasks import store_attachment
|
||||
|
||||
assert DataError in getattr(store_attachment, "dont_autoretry_for", ())
|
||||
|
||||
|
||||
class TestProcessAgentWebhookTask:
|
||||
@pytest.mark.unit
|
||||
|
||||
Reference in new issue
Block a user