prefect.runner.server

Functions

perform_health_check

perform_health_check(runner: 'Runner', delay_threshold: int | None = None) -> Callable[..., JSONResponse]

run_count

run_count(runner: 'Runner') -> Callable[..., int]

shutdown

shutdown(runner: 'Runner') -> Callable[..., JSONResponse]

get_deployment_router

get_deployment_router(runner: 'Runner') -> tuple[APIRouter, dict[Hashable, Any]]

get_subflow_schemas

get_subflow_schemas(runner: 'Runner') -> dict[str, dict[str, Any]]
Load available subflow schemas by filtering for only those subflows in the deployment entrypoint’s import space.

build_server

build_server(runner: 'Runner') -> FastAPI
Build a FastAPI server for a runner. Args:
  • runner: the runner this server interacts with and monitors
  • log_level: the log level to use for the server

start_webserver

start_webserver(runner: 'Runner', log_level: str | None = None) -> None
Run a FastAPI server for a runner. Args:
  • runner: the runner this server interacts with and monitors
  • log_level: the log level to use for the server

Classes

RunnerGenericFlowRunRequest