Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions airflow-core/src/airflow/utils/serve_logs/log_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import logging
import os
from functools import cache
from typing import cast

from fastapi import FastAPI, HTTPException, Request, status
Expand Down Expand Up @@ -157,12 +158,7 @@ def create_app():
return fastapi_app


app = None


def get_app():
"""Get or create the FastAPI app instance."""
global app
if app is None:
app = create_app()
return app
@cache
def get_app() -> FastAPI:
"""Create a cached FastAPI app instance."""
return create_app()
Loading