Skip to content

service

service

Policy and execution service for deterministic lightning actions.

Classes

LightningActionService

LightningActionService(
    config: Any = None,
    *,
    router: FastActionRouter | None = None,
)

Parse, authorize, execute and measure a single explicit user command.

Source code in src/diapason/actions/service.py
def __init__(
    self,
    config: Any = None,
    *,
    router: FastActionRouter | None = None,
) -> None:
    self._config = config
    self._router = router or FastActionRouter()
    try:
        from diapason.desktop.app_index import APP_INDEX

        APP_INDEX.ttl_s = max(1.0, float(self._get("app_cache_ttl_s", 300.0)))
    except (ImportError, TypeError, ValueError):
        pass