From e6576e9e58e8c4dde92d72ef921d56f0c90a2803 Mon Sep 17 00:00:00 2001 From: pi3c Date: Mon, 12 Feb 2024 01:11:00 +0300 Subject: [PATCH] fix --- bg_tasks/bg_task.py | 3 +-- fastfood/config.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/bg_tasks/bg_task.py b/bg_tasks/bg_task.py index ddf7360..1959e26 100644 --- a/bg_tasks/bg_task.py +++ b/bg_tasks/bg_task.py @@ -2,7 +2,6 @@ import asyncio from celery import Celery -from ..fastfood.config import settings from .updater import main loop = asyncio.get_event_loop() @@ -10,7 +9,7 @@ loop = asyncio.get_event_loop() celery_app = Celery( 'tasks', - broker=settings.REBBITMQ_URL, + broker='amqp://guest:guest@rabbitmq', backend='rpc://', include=['bg_tasks.bg_task'], ) diff --git a/fastfood/config.py b/fastfood/config.py index 4bd39c9..b5450d8 100644 --- a/fastfood/config.py +++ b/fastfood/config.py @@ -73,7 +73,7 @@ class Settings(BaseSettings): """ file_path = '/usr/src/RUN_IN_DOCKER' if os.path.exists(file_path): - return 'amqp://guest:guest@localhost' + return 'amqp://guest:guest@rabbitmq' # return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB}"