prefect.server.services.perpetual_services
Perpetual services are background services that run on a periodic schedule using docket.
This module provides the registry and scheduling logic for perpetual services,
using docket’s Perpetual dependency for distributed, HA-aware task scheduling.
Functions
perpetual_service
enabled_getter: A callable that returns whether the service is enabled.run_in_ephemeral: If True, this service runs in ephemeral server mode.run_in_webserver: If True, this service runs in webserver-only mode.
get_perpetual_services
ephemeral: If True, only return services marked with run_in_ephemeral.webserver_only: If True, only return services marked with run_in_webserver.
- List of perpetual service configurations to run.
get_enabled_perpetual_services
ephemeral: If True, only return services marked with run_in_ephemeral.webserver_only: If True, only return services marked with run_in_webserver.
- List of enabled perpetual service configurations.
register_and_schedule_perpetual_services
docket: The docket instance to register functions with.ephemeral: If True, only register services for ephemeral mode.webserver_only: If True, only register services for webserver mode.