Skip to content

Commit

Permalink
settings and docs updates bc docstring changes precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
discdiver committed Nov 22, 2024
1 parent a36403c commit 526074e
Show file tree
Hide file tree
Showing 10 changed files with 230 additions and 141 deletions.
345 changes: 213 additions & 132 deletions docs/v3/api-ref/rest-api/server/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/v3/develop/settings-ref.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ The directory to serve static files from. This should be used when running into
---
## TasksRunnerSettings
### `thread_pool_max_workers`
The maximum number of workers for ThreadPoolTaskRunner.
The maximum number of workers for ThreadPoolTaskRunner. Added in version 3.0.11.

**Type**: `integer | None`

Expand Down
2 changes: 1 addition & 1 deletion schemas/settings.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@
}
],
"default": null,
"description": "The maximum number of workers for ThreadPoolTaskRunner.",
"description": "The maximum number of workers for ThreadPoolTaskRunner. Added in version 3.0.11.",
"supported_environment_variables": [
"PREFECT_TASKS_RUNNER_THREAD_POOL_MAX_WORKERS",
"PREFECT_TASK_RUNNER_THREAD_POOL_MAX_WORKERS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,7 @@ async def write_path(self, path: str, content: bytes) -> None:
async def list_blobs(self) -> List[str]:
"""
Lists blobs available within the specified Azure container.
Added in version 0.4.1.
Used to introspect your containers.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def _populate_env(self):

def _configure_cloudsql_volumes(self):
"""
Populates volumes and volume mounts for cloudsql instances
Populates volumes and volume mounts for cloudsql instances. Added in version 0.6.2.
"""

if not self.cloudsql_instances:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class KeepAliveClientRequest(ClientRequest):
"""
aiohttp only directly implements socket keepalive for incoming connections
in its RequestHandler. For client connections, we need to set the keepalive
ourselves.
ourselves. Added in version 0.5.1.
Refer to https://github.com/aio-libs/aiohttp/issues/3904#issuecomment-759205696
"""
Expand Down
1 change: 1 addition & 0 deletions src/prefect/cache_policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def configure(
) -> Self:
"""
Configure the cache policy with the given key storage, lock manager, and isolation level.
Added in version 3.0.3.
Args:
key_storage: The storage to use for cache keys. If not provided,
Expand Down
5 changes: 4 additions & 1 deletion src/prefect/server/events/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,7 +1088,10 @@ async def new_state(self, triggered_action: "TriggeredAction") -> StateCreate:


class ResumeFlowRun(FlowRunAction):
"""Resumes a paused or suspended flow run associated with the trigger"""
"""
Resumes a paused or suspended flow run associated with the trigger.
Added in version 3.0.2.
"""

type: Literal["resume-flow-run"] = "resume-flow-run"

Expand Down
2 changes: 1 addition & 1 deletion src/prefect/settings/models/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TasksRunnerSettings(PrefectBaseSettings):
thread_pool_max_workers: Optional[int] = Field(
default=None,
gt=0,
description="The maximum number of workers for ThreadPoolTaskRunner.",
description="The maximum number of workers for ThreadPoolTaskRunner. Added in version 3.0.11.",
validation_alias=AliasChoices(
AliasPath("thread_pool_max_workers"),
"prefect_tasks_runner_thread_pool_max_workers",
Expand Down
9 changes: 6 additions & 3 deletions src/prefect/testing/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def prefect_test_harness(server_startup_timeout: Optional[int] = 30):
server_startup_timeout: The maximum time to wait for the server to start.
Defaults to 30 seconds. If set to `None`, the value of
`PREFECT_SERVER_EPHEMERAL_STARTUP_TIMEOUT_SECONDS` will be used.
Added in version 3.0.2.
Examples:
>>> from prefect import flow
Expand Down Expand Up @@ -155,9 +156,11 @@ def cleanup_temp_dir(temp_dir):
# start a subprocess server to test against
test_server = SubprocessASGIServer()
test_server.start(
timeout=server_startup_timeout
if server_startup_timeout is not None
else prefect.settings.PREFECT_SERVER_EPHEMERAL_STARTUP_TIMEOUT_SECONDS.value()
timeout=(
server_startup_timeout
if server_startup_timeout is not None
else prefect.settings.PREFECT_SERVER_EPHEMERAL_STARTUP_TIMEOUT_SECONDS.value()
)
)
stack.enter_context(
prefect.settings.temporary_settings(
Expand Down

0 comments on commit 526074e

Please sign in to comment.