This commit is contained in:
2026-05-11 03:27:21 +03:30
parent cf7cbb937c
commit d0e68a1a56
854 changed files with 102985 additions and 76 deletions
+21
View File
@@ -0,0 +1,21 @@
import logging
from celery import shared_task
from .services import sync_all_farm_alert_trackers
logger = logging.getLogger("farm_alerts")
@shared_task(
bind=True,
autoretry_for=(Exception,),
retry_backoff=True,
retry_jitter=True,
retry_kwargs={"max_retries": 3},
)
def sync_farm_alert_trackers(self):
logger.info("farm alerts periodic sync task started task_id=%s", getattr(self.request, "id", ""))
result = sync_all_farm_alert_trackers()
logger.info("farm alerts periodic sync task finished result=%s", result)
return result