From 1c34969f64db3ec06c0dd8ac58f14709ee1add1e Mon Sep 17 00:00:00 2001 From: wh1te909 Date: Sun, 25 Feb 2024 23:42:08 +0000 Subject: [PATCH] fix redis --- ansible/roles/trmm_dev/templates/local_settings.j2 | 1 - api/tacticalrmm/tacticalrmm/celery.py | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/trmm_dev/templates/local_settings.j2 b/ansible/roles/trmm_dev/templates/local_settings.j2 index a231680d..eb996590 100644 --- a/ansible/roles/trmm_dev/templates/local_settings.j2 +++ b/ansible/roles/trmm_dev/templates/local_settings.j2 @@ -13,7 +13,6 @@ DATABASES = { 'PORT': '5432', } } -REDIS_HOST = "localhost" ADMIN_ENABLED = True CERT_FILE = "{{ fullchain_dest }}" KEY_FILE = "{{ privkey_dest }}" diff --git a/api/tacticalrmm/tacticalrmm/celery.py b/api/tacticalrmm/tacticalrmm/celery.py index 100d7ba5..e92ccc32 100644 --- a/api/tacticalrmm/tacticalrmm/celery.py +++ b/api/tacticalrmm/tacticalrmm/celery.py @@ -9,7 +9,8 @@ from django.conf import settings os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tacticalrmm.settings") -app = Celery("tacticalrmm", backend="redis://" + settings.REDIS_HOST, broker="redis://" + settings.REDIS_HOST) # type: ignore +redis_host = f"redis://{settings.REDIS_HOST}" +app = Celery("tacticalrmm", backend=redis_host, broker=redis_host) app.accept_content = ["application/json"] app.result_serializer = "json" app.task_serializer = "json"