Skip to content

Commit 66d185b

Browse files
authored
Enabled multiple workers in production build. Hopefully (#67)
this fixes the load time issue. Seems to work for me in local prod mode.
1 parent 7a9362f commit 66d185b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

backend/beets_flask/config/flask_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ServerConfig:
3636

3737
# Folder where the frontend build resources are stored
3838
# FIXME: 2025-06-04 likely we only need this in production.
39-
FRONTEND_DIST_DIR = "../../frontend/dist/"
39+
FRONTEND_DIST_DIR = "../frontend/dist/"
4040

4141
# Not sure if this is even used!
4242
SECRET_KEY = "secret"

backend/beets_flask/server/websocket/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def on(self, event: str, namespace: str | None = None) -> Callable: ... # type:
1717
logger=False,
1818
engineio_logger=False,
1919
cors_allowed_origins="*",
20+
client_manager=socketio.AsyncRedisManager("redis://"),
2021
),
2122
)
2223

docker/entrypoints/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ redis-cli FLUSHALL
2626
uvicorn beets_flask.server.app:create_app --port 5001 \
2727
--host 0.0.0.0 \
2828
--factory \
29-
--workers 1
29+
--workers 4

0 commit comments

Comments
 (0)