14 lines
395 B
Python
14 lines
395 B
Python
from celery import Celery
|
|
from dotenv import load_dotenv
|
|
|
|
# Load environment variables from .env file
|
|
load_dotenv()
|
|
|
|
CELERY_BROKER_URL = 'redis://localhost:6379/0'
|
|
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
|
|
|
|
celery = Celery('tasks',
|
|
broker=CELERY_BROKER_URL,
|
|
backend=CELERY_RESULT_BACKEND,
|
|
include=['tasks']) # Point to the tasks module
|