Fix: The server was also using the worker settings to communicate with redis.
This led to it using the default host and port as the backend .env files do not contain worker settings.
This commit is contained in:
parent
e99b8f3070
commit
592f26af20
@ -2,4 +2,4 @@ from arq.connections import RedisSettings
|
||||
from barker.core.config import settings as sett
|
||||
|
||||
|
||||
settings = RedisSettings(host=sett.WORKER_REDIS_HOST, port=sett.WORKER_REDIS_PORT)
|
||||
settings = RedisSettings(host=sett.REDIS_HOST, port=sett.REDIS_PORT)
|
||||
|
5
barker/barker/core/arq_worker.py
Normal file
5
barker/barker/core/arq_worker.py
Normal file
@ -0,0 +1,5 @@
|
||||
from arq.connections import RedisSettings
|
||||
from barker.core.config import settings as sett
|
||||
|
||||
|
||||
settings = RedisSettings(host=sett.WORKER_REDIS_HOST, port=sett.WORKER_REDIS_PORT)
|
@ -4,7 +4,7 @@ from aiohttp import ClientSession
|
||||
from barker.core.config import settings as sett
|
||||
from barker.tasks.printing import sent_to_printer
|
||||
|
||||
from .core.arq import settings
|
||||
from .core.arq_worker import settings
|
||||
|
||||
|
||||
sys.path.extend(["./"])
|
||||
@ -13,7 +13,7 @@ sys.path.extend(["./"])
|
||||
async def startup(ctx):
|
||||
ctx["session"] = ClientSession()
|
||||
print(f"Worker listening for: {sett.WORKER_QUEUE_NAME}")
|
||||
print(f"Worker printing on: {sett.WORKER_PRINTER_ADDRESS}")
|
||||
# print(f"Worker printing on: {sett.WORKER_PRINTER_ADDRESS}")
|
||||
|
||||
|
||||
async def shutdown(ctx):
|
||||
|
Loading…
Reference in New Issue
Block a user