Skip to content

Commit

Permalink
Update deployment docs to include tag and idempotency key (#7771)
Browse files Browse the repository at this point in the history
Co-authored-by: vicente <vicente@getbluesky.io>
  • Loading branch information
2 people authored and madkinsz committed Jan 12, 2023
1 parent 2161389 commit b83b2c0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/prefect/deployments.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@
@inject_client
async def run_deployment(
name: str,
client: OrionClient = None,
parameters: dict = None,
scheduled_time: datetime = None,
flow_run_name: str = None,
timeout: float = None,
poll_interval: float = 5,
client: Optional[OrionClient] = None,
parameters: Optional[dict] = None,
scheduled_time: Optional[datetime] = None,
flow_run_name: Optional[str] = None,
timeout: Optional[float] = None,
poll_interval: Optional[float] = 5,
tags: Optional[Iterable[str]] = None,
idempotency_key: str = None,
idempotency_key: Optional[str] = None,
):
"""
Create a flow run for a deployment and return it after completion or a timeout.
Expand All @@ -65,7 +65,7 @@ async def run_deployment(
Args:
name: The deployment name in the form: '<flow-name>/<deployment-name>'
parameters: Parameter overrides for this flow run. Merged with the deployment
defaults
defaults.
scheduled_time: The time to schedule the flow run for, defaults to scheduling
the flow run to start now.
flow_run_name: A name for the created flow run
Expand All @@ -74,6 +74,8 @@ async def run_deployment(
Setting `timeout` to None will allow this function to poll indefinitely.
Defaults to None
poll_interval: The number of seconds between polls
tags: A list of tags to associate with this flow run; note that tags are used only for organizational purposes.
idempotency_key: A unique value to recognize retries of the same run, and prevent creating multiple flow runs.
"""
if timeout is not None and timeout < 0:
raise ValueError("`timeout` cannot be negative")
Expand Down

0 comments on commit b83b2c0

Please sign in to comment.