Compare commits

..

No commits in common. "ed6763092b135ba545359ed59ab7c4f4f34a7493" and "ad4b06043ce2fe9c7065781fa54babd6ca4a2922" have entirely different histories.

2 changed files with 1 additions and 6 deletions

View File

@ -12,10 +12,6 @@ DB_NAME=konova
DB_HOST=127.0.0.1 DB_HOST=127.0.0.1
DB_PORT=5432 DB_PORT=5432
# Redis (for celery)
REDIS_HOST=CHANGE_ME
REDIS_PORT=CHANGE_ME
# E-Mail # E-Mail
SMTP_HOST=localhost SMTP_HOST=localhost
SMTP_PORT=25 SMTP_PORT=25

View File

@ -1,7 +1,6 @@
import os import os
from celery import Celery from celery import Celery
from konova.sub_settings.django_settings import env
# Set the default Django settings module for the 'celery' program. # Set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'konova.settings') os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'konova.settings')
@ -18,7 +17,7 @@ app.config_from_object('django.conf:settings', namespace='CELERY')
app.autodiscover_tasks() app.autodiscover_tasks()
# Declare redis as broker # Declare redis as broker
app.conf.broker_url = f'redis://{env("REDIS_HOST")}:{env.int("REDIS_PORT")}/0' app.conf.broker_url = f"redis://{os.environ.get('REDIS_HOST')}:6379/0"
@app.task(bind=True) @app.task(bind=True)