Skip to content

Commit 54f0851

Browse files
committed
remove unrelated changes
1 parent 70db314 commit 54f0851

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ services:
2020
image: "${OLIMAGE:-oldev:latest}"
2121
environment:
2222
- OL_CONFIG=${OL_CONFIG:-/openlibrary/conf/openlibrary.yml}
23-
- GUNICORN_OPTS=${GUNICORN_OPTS:- --reload --workers 2 --timeout 180 --max-requests 500}
23+
- GUNICORN_OPTS=${GUNICORN_OPTS:- --reload --workers 1 --timeout 180 --max-requests 500}
2424
command: docker/ol-web-fastapi-start.sh
2525
ports:
2626
- ${FAST_WEB_PORT:-18080}:8080

openlibrary/asgi_app.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def wrapper(environ, start_response):
3434
return wrapper
3535

3636

37-
def _load_legacy_wsgi():
37+
def _load_legacy_wsgi(ol_config_file: str):
3838
"""Initialize legacy configuration and side-effects as in scripts/openlibrary-server.
3939
4040
This function does not return a WSGI callable; it is called for its side effects only.
@@ -45,9 +45,6 @@ def _load_legacy_wsgi():
4545
# match scripts/openlibrary-server behavior
4646
from infogami.utils import delegate as _delegate # noqa: F401 - side-effects
4747

48-
ol_config_path = Path(__file__).parent / "conf" / "openlibrary.yml"
49-
ol_config_file = os.environ.get("OL_CONFIG", str(ol_config_path))
50-
5148
config.plugin_path += ["openlibrary.plugins"]
5249
config.site = "openlibrary.org"
5350

@@ -124,9 +121,11 @@ def create_app() -> FastAPI:
124121

125122
pytest.skip("Skipping in CI", allow_module_level=True)
126123

124+
ol_config_path = Path(__file__).parent / "conf" / "openlibrary.yml"
125+
ol_config = os.environ.get("OL_CONFIG", str(ol_config_path))
127126
try:
128127
# We still call this even though we don't use it because of the side effects
129-
_load_legacy_wsgi()
128+
legacy_wsgi = _load_legacy_wsgi(ol_config) # noqa: F841
130129

131130
global sentry
132131
if sentry is not None:

0 commit comments

Comments
 (0)