diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ae70a87eb..0b0f47301 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -93,8 +93,7 @@ echo "openapi.yml generated continue to pygeoapi" echo "Trying to generate asyncapi.yml" /venv/bin/pygeoapi asyncapi generate ${PYGEOAPI_CONFIG} --output-file ${PYGEOAPI_ASYNCAPI} -[[ $? -ne 0 ]] && error "asyncapi.yml could not be generated ERROR" -echo "asyncapi.yml generated continue to pygeoapi" +[[ $? -ne 0 ]] && echo "asyncapi.yml could not be generated; skipping" start_gunicorn() { # SCRIPT_NAME should not have value '/' diff --git a/pygeoapi/asyncapi.py b/pygeoapi/asyncapi.py index 363ffa610..055cc1ba0 100644 --- a/pygeoapi/asyncapi.py +++ b/pygeoapi/asyncapi.py @@ -222,8 +222,8 @@ def load_asyncapi_document() -> dict: if not os.path.exists(pygeoapi_asyncapi): msg = (f'AsyncAPI document {pygeoapi_asyncapi} does not exist. ' 'Please generate before starting pygeoapi') - LOGGER.error(msg) - raise RuntimeError(msg) + LOGGER.warning(msg) + return {} with open(pygeoapi_asyncapi, encoding='utf8') as ff: if pygeoapi_asyncapi.endswith(('.yaml', '.yml')):