20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140 | class ServerSettings(PrefectBaseSettings):
"""
Settings for controlling server behavior
"""
model_config = _build_settings_config(("server",))
logging_level: LogLevel = Field(
default="WARNING",
description="The default logging level for the Prefect API server.",
validation_alias=AliasChoices(
AliasPath("logging_level"),
"prefect_server_logging_level",
"prefect_logging_server_level",
),
)
analytics_enabled: bool = Field(
default=True,
description="""
When enabled, Prefect sends anonymous data (e.g. count of flow runs, package version)
on server startup to help us improve our product.
""",
)
metrics_enabled: bool = Field(
default=False,
description="Whether or not to enable Prometheus metrics in the API.",
validation_alias=AliasChoices(
AliasPath("metrics_enabled"),
"prefect_server_metrics_enabled",
"prefect_api_enable_metrics",
),
)
log_retryable_errors: bool = Field(
default=False,
description="If `True`, log retryable errors in the API and it's services.",
validation_alias=AliasChoices(
AliasPath("log_retryable_errors"),
"prefect_server_log_retryable_errors",
"prefect_api_log_retryable_errors",
),
)
register_blocks_on_start: bool = Field(
default=True,
description="If set, any block types that have been imported will be registered with the backend on application startup. If not set, block types must be manually registered.",
validation_alias=AliasChoices(
AliasPath("register_blocks_on_start"),
"prefect_server_register_blocks_on_start",
"prefect_api_blocks_register_on_start",
),
)
memoize_block_auto_registration: bool = Field(
default=True,
description="Controls whether or not block auto-registration on start",
validation_alias=AliasChoices(
AliasPath("memoize_block_auto_registration"),
"prefect_server_memoize_block_auto_registration",
"prefect_memoize_block_auto_registration",
),
)
memo_store_path: Optional[Path] = Field(
default=None,
description="The path to the memo store file.",
validation_alias=AliasChoices(
AliasPath("memo_store_path"),
"prefect_server_memo_store_path",
"prefect_memo_store_path",
),
)
deployment_schedule_max_scheduled_runs: int = Field(
default=50,
description="The maximum number of scheduled runs to create for a deployment.",
validation_alias=AliasChoices(
AliasPath("deployment_schedule_max_scheduled_runs"),
"prefect_server_deployment_schedule_max_scheduled_runs",
"prefect_deployment_schedule_max_scheduled_runs",
),
)
api: ServerAPISettings = Field(
default_factory=ServerAPISettings,
description="Settings for controlling API server behavior",
)
database: ServerDatabaseSettings = Field(
default_factory=ServerDatabaseSettings,
description="Settings for controlling server database behavior",
)
deployments: ServerDeploymentsSettings = Field(
default_factory=ServerDeploymentsSettings,
description="Settings for controlling server deployments behavior",
)
ephemeral: ServerEphemeralSettings = Field(
default_factory=ServerEphemeralSettings,
description="Settings for controlling ephemeral server behavior",
)
events: ServerEventsSettings = Field(
default_factory=ServerEventsSettings,
description="Settings for controlling server events behavior",
)
flow_run_graph: ServerFlowRunGraphSettings = Field(
default_factory=ServerFlowRunGraphSettings,
description="Settings for controlling flow run graph behavior",
)
services: ServerServicesSettings = Field(
default_factory=ServerServicesSettings,
description="Settings for controlling server services behavior",
)
tasks: ServerTasksSettings = Field(
default_factory=ServerTasksSettings,
description="Settings for controlling server tasks behavior",
)
ui: ServerUISettings = Field(
default_factory=ServerUISettings,
description="Settings for controlling server UI behavior",
)
|