> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# services

# `prefect.settings.models.server.services`

## Classes

### `ServicesBaseSetting` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L11](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L11)</sup>

**Methods:**

#### `settings_customise_sources` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L33](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L33)</sup>

```python theme={null}
settings_customise_sources(cls, settings_cls: type[BaseSettings], init_settings: PydanticBaseSettingsSource, env_settings: PydanticBaseSettingsSource, dotenv_settings: PydanticBaseSettingsSource, file_secret_settings: PydanticBaseSettingsSource) -> tuple[PydanticBaseSettingsSource, ...]
```

Define an order for Prefect settings sources.

The order of the returned callables decides the priority of inputs; first item is the highest priority.

See [https://docs.pydantic.dev/latest/concepts/pydantic\_settings/#customise-settings-sources](https://docs.pydantic.dev/latest/concepts/pydantic_settings/#customise-settings-sources)

#### `to_environment_variables` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L124](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L124)</sup>

```python theme={null}
to_environment_variables(self, exclude_unset: bool = False, include_secrets: bool = True, include_aliases: bool = False) -> dict[str, str]
```

Convert the settings object to a dictionary of environment variables.

### `ServerServicesCancellationCleanupSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L18](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L18)</sup>

Settings for controlling the cancellation cleanup service

### `ServerServicesDBVacuumSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L87](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L87)</sup>

Settings for controlling the database vacuum service

**Methods:**

#### `enabled_vacuum_types` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L105](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L105)</sup>

```python theme={null}
enabled_vacuum_types(self) -> set[str]
```

Resolve `enabled` to a concrete set of vacuum type strings.

Handles legacy boolean values:

* `True`  → `{"events", "flow_runs", "orphans"}`
* `False` → `{"events"}` (preserves old default)
* `None`  → `set()`

Enabling `flow_runs` implies `orphans` to preserve the flow run
vacuum's historical orphan-cleanup behavior.

### `ServerServicesEventPersisterSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L165](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L165)</sup>

Settings for controlling the event persister service

### `ServerServicesEventLoggerSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L230](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L230)</sup>

Settings for controlling the event logger service

### `ServerServicesForemanSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L250](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L250)</sup>

Settings for controlling the foreman service

### `ServerServicesLateRunsSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L331](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L331)</sup>

Settings for controlling the late runs service

### `ServerServicesSchedulerSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L375](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L375)</sup>

Settings for controlling the scheduler service

### `ServerServicesPauseExpirationsSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L507](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L507)</sup>

Settings for controlling the pause expiration service

### `ServerServicesRepossessorSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L543](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L543)</sup>

Settings for controlling the repossessor service

### `ServerServicesCleanupReconcilerSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L563](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L563)</sup>

Settings for controlling the cleanup reconciler service.

### `ServerServicesTaskRunRecorderSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L590](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L590)</sup>

Settings for controlling the task run recorder service

### `ServerServicesTriggersSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L628](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L628)</sup>

Settings for controlling the triggers service

### `ServerServicesSettings` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L680](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/models/server/services.py#L680)</sup>

Settings for controlling server services

**Methods:**

#### `settings_customise_sources` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L33](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L33)</sup>

```python theme={null}
settings_customise_sources(cls, settings_cls: type[BaseSettings], init_settings: PydanticBaseSettingsSource, env_settings: PydanticBaseSettingsSource, dotenv_settings: PydanticBaseSettingsSource, file_secret_settings: PydanticBaseSettingsSource) -> tuple[PydanticBaseSettingsSource, ...]
```

Define an order for Prefect settings sources.

The order of the returned callables decides the priority of inputs; first item is the highest priority.

See [https://docs.pydantic.dev/latest/concepts/pydantic\_settings/#customise-settings-sources](https://docs.pydantic.dev/latest/concepts/pydantic_settings/#customise-settings-sources)

#### `to_environment_variables` <sup>[https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L124](https://github.com/PrefectHQ/prefect/blob/main/src/prefect/settings/base.py#L124)</sup>

```python theme={null}
to_environment_variables(self, exclude_unset: bool = False, include_secrets: bool = True, include_aliases: bool = False) -> dict[str, str]
```

Convert the settings object to a dictionary of environment variables.
