diff --git a/config/__init__.py b/config/__init__.py index 52e5024..742da6a 100644 --- a/config/__init__.py +++ b/config/__init__.py @@ -1,6 +1,3 @@ from .celery import app as celery_app - -__all__ = ( - "celery_app" -) \ No newline at end of file +__all__ = ['celery_app'] \ No newline at end of file diff --git a/config/celery.py b/config/celery.py index edd621b..bf93d89 100644 --- a/config/celery.py +++ b/config/celery.py @@ -6,7 +6,7 @@ from config.env import env os.environ.setdefault("DJANGO_SETTINGS_MODULE", env("DJANGO_SETTINGS_MODULE")) -app = celery.Celery("config") +app = celery.Celery('config', broker="redis://redis:6379", backend="redis://redis:6379") app.config_from_object("django.conf:settings", namespace="CELERY") diff --git a/config/conf/celery.py b/config/conf/celery.py index 4e4054e..231f9e3 100644 --- a/config/conf/celery.py +++ b/config/conf/celery.py @@ -1,10 +1,6 @@ from django.conf import settings -from config.env import env CELERY_BROKER_URL = 'redis://redis:6379/0' CELERY_ACCEPT_CONTENT = ['json'] CELERY_TASK_SERIALIZER = 'json' -CELERY_TIMEZONE = settings.TIME_ZONE - -if not env('DEBUG'): - SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https') +CELERY_TIMEZONE = settings.TIME_ZONE \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 52546a3..ca440d2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -49,11 +49,14 @@ services: command: celery -A config worker --loglevel=info environment: - CELERY_BROKER_URL=redis://redis:6379/0 + - CELERY_RESULT_BACKEND=redis://redis:6379/0 depends_on: - redis - web networks: - trustme + volumes: + - "./:/code" restart: always db: