Adicionar app/celery_app.py
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
# All comments are in English.
|
||||
|
||||
from celery import Celery
|
||||
import os
|
||||
|
||||
redis_url = os.getenv("REDIS_URL", "redis://redis:6379/0")
|
||||
|
||||
celery = Celery(
|
||||
"safira",
|
||||
broker=redis_url,
|
||||
backend=redis_url,
|
||||
)
|
||||
|
||||
celery.conf.update(
|
||||
task_serializer="json",
|
||||
accept_content=["json"],
|
||||
result_serializer="json",
|
||||
timezone="UTC",
|
||||
enable_utc=True,
|
||||
)
|
||||
Reference in New Issue
Block a user