added enums for status constants/fixed status not updating

This commit is contained in:
tpv committed 2026-07-06 12:18:57 -07:00
1 parent b0319f6ada
commit 6b3bd33739
2 files changed
+14 -9

No files matched your search

+10 -4
View File
@@ -6,6 +6,7 @@ and the expected error tuple used for known-failure handling.
"""
import asyncio
from enum import Enum
from json import JSONDecodeError
import aiohttp
@@ -58,10 +59,6 @@ BUCKET_WEBHOOK_MAP = {
90: "90-100",
"price_drop": "40-49",
}
STATUS_PENDING = "pending"
STATUS_SENT = "sent"
STATUS_SKIPPED = "skipped"
STATUS_FAILED = "failed"
EXPECTED_TASK_ERRORS = (
RequestsError,
@@ -72,3 +69,12 @@ EXPECTED_TASK_ERRORS = (
PyMongoError,
JSONDecodeError,
)
class ProductStatus(str, Enum):
"""Lifecycle status for a monitored product document."""
PENDING = "pending"
SENT = "sent"
SKIPPED = "skipped"
FAILED = "failed"