Compare commits
No commits in common. "134afae038fb89f7069dab559f6600ef55158ea3" and "801c9078e9f05bef0de1fbb69c3fd1e64bd13b20" have entirely different histories.
134afae038
...
801c9078e9
@ -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
|
||||||
|
@ -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 = 'redis://localhost:6379/0'
|
||||||
|
|
||||||
|
|
||||||
@app.task(bind=True)
|
@app.task(bind=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user