Added celery and rabbitmq

This commit is contained in:
maciejrusek
2026-03-17 20:42:58 +01:00
parent 8b55be1b9c
commit e0ff3e1cf6
11 changed files with 59 additions and 27 deletions

View File

@@ -0,0 +1,3 @@
from config.celery import app as celery_app
__all__ = ('celery_app',)

11
backend/config/celery.py Normal file
View File

@@ -0,0 +1,11 @@
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.django.dev')
app = Celery('library')
app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks()

View File

@@ -131,3 +131,5 @@ USE_TZ = True
# https://docs.djangoproject.com/en/6.0/howto/static-files/
STATIC_URL = "static/"
from config.settings.celery import *

View File

View File

@@ -0,0 +1,3 @@
from config.env import env
CELERY_BROKER_URL = env("CELERY_BROKER_URL")