This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
from .celery import app as celery_app
|
||||
|
||||
__all__ = ("celery_app",)
|
||||
@@ -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()
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user