enable celery
Gitea Actions Demo / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
pierre geeraert
2025-12-01 23:16:55 +00:00
parent 583522a422
commit a75aabbec6
5 changed files with 46 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
from .celery import app as celery_app
__all__ = ("celery_app",)
+8
View File
@@ -0,0 +1,8 @@
import os
from celery import Celery
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_code.settings')
app = Celery("django_code")
app.config_from_object("django.conf:settings", namespace="CELERY")
app.autodiscover_tasks()
+3
View File
@@ -124,3 +124,6 @@ STATIC_URL = 'static/'
DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
#
# Celery settings
CELERY_BROKER_URL = "redis://localhost:6379"
CELERY_RESULT_BACKEND = "redis://localhost:6379"