Fix worker communication initialization

- Update workers to use proper socket path from config instead of hardcoded paths
- Ensure workers check communication type and use appropriate connection method
- Fix SocketCommunicator to properly handle Unix socket paths
- Revert database default back to 'unix' for proper Unix socket support
parent 9e0ff1bd
......@@ -176,7 +176,8 @@ def worker_process(backend_type: str):
comm_type = get_comm_type()
if comm_type == 'unix':
comm = SocketCommunicator(socket_path='/tmp/vidai_workers.sock', comm_type='unix')
from .compat import get_socket_path
comm = SocketCommunicator(socket_path=get_socket_path('worker'), comm_type='unix')
else:
from .config import get_backend_worker_port
comm = SocketCommunicator(host='localhost', port=get_backend_worker_port(), comm_type='tcp')
......
......@@ -49,7 +49,8 @@ def worker_process(backend_type: str):
comm_type = get_comm_type()
if comm_type == 'unix':
comm = SocketCommunicator(socket_path='/tmp/vidai_workers.sock', comm_type='unix')
from .compat import get_socket_path
comm = SocketCommunicator(socket_path=get_socket_path('worker'), comm_type='unix')
else:
from .config import get_backend_worker_port
comm = SocketCommunicator(host='localhost', port=get_backend_worker_port(), comm_type='tcp')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment