Skip to content

Commit 478864c

Browse files
authored
fix AsyncAPI handling on Docker startup (#2227)
1 parent 6457233 commit 478864c

2 files changed

Lines changed: 3 additions & 4 deletions

File tree

docker/entrypoint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@ echo "openapi.yml generated continue to pygeoapi"
9393
echo "Trying to generate asyncapi.yml"
9494
/venv/bin/pygeoapi asyncapi generate ${PYGEOAPI_CONFIG} --output-file ${PYGEOAPI_ASYNCAPI}
9595

96-
[[ $? -ne 0 ]] && error "asyncapi.yml could not be generated ERROR"
97-
echo "asyncapi.yml generated continue to pygeoapi"
96+
[[ $? -ne 0 ]] && echo "asyncapi.yml could not be generated; skipping"
9897

9998
start_gunicorn() {
10099
# SCRIPT_NAME should not have value '/'

pygeoapi/asyncapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ def load_asyncapi_document() -> dict:
222222
if not os.path.exists(pygeoapi_asyncapi):
223223
msg = (f'AsyncAPI document {pygeoapi_asyncapi} does not exist. '
224224
'Please generate before starting pygeoapi')
225-
LOGGER.error(msg)
226-
raise RuntimeError(msg)
225+
LOGGER.warning(msg)
226+
return {}
227227

228228
with open(pygeoapi_asyncapi, encoding='utf8') as ff:
229229
if pygeoapi_asyncapi.endswith(('.yaml', '.yml')):

0 commit comments

Comments
 (0)