import os

from futplus.settings import CELERY_BROKER, CELERY_BACKEND

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'futplus.settings')

from celery import Celery

# todo : fix redis url for to get from settings for every server


app = Celery('futplus', broker=CELERY_BROKER, backend=CELERY_BACKEND)

app.conf.update(
    task_serializer='json',
    accept_content=['json'],  # Ignore other content
    result_serializer='json',
    timezone='Asia/Tehran',
    # enable_utc=True,
)

app.autodiscover_tasks()
