Skip to content

prefect.settings.models.runner

RunnerServerSettings

Bases: PrefectBaseSettings

Settings for controlling runner server behavior

Source code in src/prefect/settings/models/runner.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
class RunnerServerSettings(PrefectBaseSettings):
    """
    Settings for controlling runner server behavior
    """

    model_config = _build_settings_config(("runner", "server"))

    enable: bool = Field(
        default=False,
        description="Whether or not to enable the runner's webserver.",
    )

    host: str = Field(
        default="localhost",
        description="The host address the runner's webserver should bind to.",
    )

    port: int = Field(
        default=8080,
        description="The port the runner's webserver should bind to.",
    )

    log_level: LogLevel = Field(
        default="error",
        description="The log level of the runner's webserver.",
    )

    missed_polls_tolerance: int = Field(
        default=2,
        description="Number of missed polls before a runner is considered unhealthy by its webserver.",
    )

RunnerSettings

Bases: PrefectBaseSettings

Settings for controlling runner behavior

Source code in src/prefect/settings/models/runner.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
class RunnerSettings(PrefectBaseSettings):
    """
    Settings for controlling runner behavior
    """

    model_config = _build_settings_config(("runner",))

    process_limit: int = Field(
        default=5,
        description="Maximum number of processes a runner will execute in parallel.",
    )

    poll_frequency: int = Field(
        default=10,
        description="Number of seconds a runner should wait between queries for scheduled work.",
    )

    server: RunnerServerSettings = Field(
        default_factory=RunnerServerSettings,
        description="Settings for controlling runner server behavior",
    )