fix
parent
02134d247a
commit
e6576e9e58
|
@ -2,7 +2,6 @@ import asyncio
|
||||||
|
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
|
|
||||||
from ..fastfood.config import settings
|
|
||||||
from .updater import main
|
from .updater import main
|
||||||
|
|
||||||
loop = asyncio.get_event_loop()
|
loop = asyncio.get_event_loop()
|
||||||
|
@ -10,7 +9,7 @@ loop = asyncio.get_event_loop()
|
||||||
|
|
||||||
celery_app = Celery(
|
celery_app = Celery(
|
||||||
'tasks',
|
'tasks',
|
||||||
broker=settings.REBBITMQ_URL,
|
broker='amqp://guest:guest@rabbitmq',
|
||||||
backend='rpc://',
|
backend='rpc://',
|
||||||
include=['bg_tasks.bg_task'],
|
include=['bg_tasks.bg_task'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -73,7 +73,7 @@ class Settings(BaseSettings):
|
||||||
"""
|
"""
|
||||||
file_path = '/usr/src/RUN_IN_DOCKER'
|
file_path = '/usr/src/RUN_IN_DOCKER'
|
||||||
if os.path.exists(file_path):
|
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}"
|
# return f"redis://{self.REDIS_HOST}:{self.REDIS_PORT}/{self.REDIS_DB}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue