Skip to content

Commit 517dc3e

Browse files
committed
Use prefect ephemeral mode
1 parent e489588 commit 517dc3e

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/controlflow/settings.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ class Settings(ControlFlowSettings):
119119
alias="PREFECT_LOGGING_LEVEL",
120120
)
121121

122+
prefect_api_url: Optional[str] = Field(
123+
default=None,
124+
description="The URL for the Prefect API. Leave unset to use an ephemeral API.",
125+
alias="PREFECT_API_URL",
126+
)
127+
128+
prefect_server_allow_ephemeral_mode: bool = Field(
129+
default=True,
130+
description="If True, ephemeral mode will be allowed for Prefect Server.",
131+
alias="PREFECT_SERVER_ALLOW_EPHEMERAL_MODE",
132+
)
133+
122134
_prefect_context: contextmanager = None
123135

124136
@field_validator("home_path", mode="before")
@@ -145,7 +157,11 @@ def _apply_prefect_settings(self):
145157
self._prefect_context.__exit__(None, None, None)
146158
self._prefect_context = None
147159

148-
settings_map = {"prefect_log_level": prefect.settings.PREFECT_LOGGING_LEVEL}
160+
settings_map = {
161+
"prefect_log_level": prefect.settings.PREFECT_LOGGING_LEVEL,
162+
"prefect_api_url": prefect.settings.PREFECT_API_URL,
163+
"prefect_server_allow_ephemeral_mode": prefect.settings.PREFECT_SERVER_ALLOW_EPHEMERAL_MODE,
164+
}
149165

150166
prefect_settings = {}
151167

0 commit comments

Comments
 (0)