Newer
Older
"""The main entrypoint for :term:`GSO`, and the different ways in which it can be run."""

Mohammad Torkashvand
committed
from gso import monkeypatches # noqa: F401, isort:skip
from orchestrator.cli.main import app as cli_app
Karel van Klink
committed
import gso.products
import gso.workflows # noqa: F401
from gso.api import router as api_router

Neda Moeini
committed
from gso.middlewares import ModifyProcessEndpointResponse
"""Initialise the :term:`GSO` app."""

Neda Moeini
committed
app.add_middleware(ModifyProcessEndpointResponse)
return app
def init_worker_app() -> OrchestratorCore:
"""Initialise a :term:`GSO` instance as Celery worker."""
"""Initialise :term:`GSO` as a CLI application."""
from gso.cli import imports, netbox # noqa: PLC0415
cli_app.add_typer(imports.app, name="import-cli")
cli_app.add_typer(netbox.app, name="netbox-cli")
return cli_app()