File size: 556 Bytes
4223796
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from celery import Celery
from app.config import get_settings

settings = get_settings()

celery_app = Celery(
    "crowdata",
    broker=settings.redis_url,
    backend=settings.redis_url,
    include=["app.tasks.report_tasks"],
)

celery_app.conf.update(
    task_serializer="json",
    accept_content=["json"],
    result_serializer="json",
    timezone="America/Argentina/Buenos_Aires",
    enable_utc=True,
    task_track_started=True,
    task_soft_time_limit=60,
    task_time_limit=120,
    worker_prefetch_multiplier=1,
    task_acks_late=True,
)