Added celerity background process

This commit is contained in:
2025-02-14 19:39:23 +01:00
parent 595b7a2a17
commit 65716ff842
5 changed files with 83 additions and 59 deletions

View File

@@ -51,6 +51,8 @@ INSTALLED_APPS = [
'django_extensions',
'widget_tweaks',
'django_seed',
'django_celery_results',
# my apps
'backend.accounts.apps.AccountsConfig',
'backend.core.apps.CoreConfig',
@@ -156,3 +158,11 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
LOGIN_URL = '/admin/login/'
LOGIN_REDIRECT_URL = 'core:index'
# LOGOUT_REDIRECT_URL = 'core:index'
# Celery Configuration
CELERY_BROKER_URL = 'redis://localhost:6380/0'
CELERY_RESULT_BACKEND = 'django-db' # Store task results in the Django database
CELERY_ACCEPT_CONTENT = ['json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_TIMEZONE = 'UTC'