Skip to content

Commit

Permalink
Import api as late as possible
Browse files Browse the repository at this point in the history
  • Loading branch information
totycro committed Dec 3, 2024
1 parent 8ab8839 commit 8ec273c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pygeoapi_kubernetes_papermill/log_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import requests

# NOTE: this assumes flask_app, which is the default.
from pygeoapi.flask_app import APP, api_
from pygeoapi.flask_app import APP


LOGGER = logging.getLogger(__name__)
Expand All @@ -44,6 +44,8 @@
def get_job_logs(process_id, job_id):
LOGGER.debug(f"Retrieving job logs for {process_id} {job_id}")

from pygeoapi.flask_app import api_

log_query_endpoint = getattr(api_.manager, "log_query_endpoint", None)
if not log_query_endpoint:
headers, status, content = api_.get_exception(
Expand Down

0 comments on commit 8ec273c

Please sign in to comment.