mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-21 08:02:38 +00:00
Merge branch 'main' into datatable-roles-redesign
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill"
|
||||
version = "1.808.0"
|
||||
version = "1.809.0"
|
||||
description = "A client library for accessing Windmill server wrapping the Windmill client API"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
|
||||
@@ -3103,6 +3103,8 @@ class WorkflowCtx:
|
||||
form: dict | None = None,
|
||||
self_approval: bool = True,
|
||||
key: str | None = None,
|
||||
skin: str | None = None,
|
||||
description: str | dict | None = None,
|
||||
):
|
||||
if key is not None:
|
||||
_assert_usable_step_key(key, "wait_for_approval key")
|
||||
@@ -3131,6 +3133,8 @@ class WorkflowCtx:
|
||||
"timeout": timeout,
|
||||
"form": form,
|
||||
"self_approval_disabled": not self_approval,
|
||||
"skin": skin,
|
||||
"description": description,
|
||||
"steps": [],
|
||||
})
|
||||
|
||||
@@ -3577,6 +3581,8 @@ async def wait_for_approval(
|
||||
form: dict | None = None,
|
||||
self_approval: bool = True,
|
||||
key: str | None = None,
|
||||
skin: Literal["detailed", "minimal"] | None = None,
|
||||
description: str | dict | None = None,
|
||||
) -> dict:
|
||||
"""Suspend the workflow and wait for an external approval.
|
||||
|
||||
@@ -3591,6 +3597,10 @@ async def wait_for_approval(
|
||||
form: Optional form schema for the approval page.
|
||||
self_approval: Whether the user who triggered the flow can approve it (default True).
|
||||
key: Optional checkpoint key naming this approval step.
|
||||
skin: ``"minimal"`` shows approvers only the request (form and approve/reject)
|
||||
instead of the detailed page with the workflow's details.
|
||||
description: Shown to approvers above the form: a string, or a rich value such as
|
||||
``{"markdown": "..."}``.
|
||||
|
||||
Example::
|
||||
|
||||
@@ -3601,7 +3611,12 @@ async def wait_for_approval(
|
||||
ctx: WorkflowCtx | None = _workflow_ctx.get(None)
|
||||
if ctx is not None:
|
||||
return await ctx._wait_for_approval(
|
||||
timeout=timeout, form=form, self_approval=self_approval, key=key
|
||||
timeout=timeout,
|
||||
form=form,
|
||||
self_approval=self_approval,
|
||||
key=key,
|
||||
skin=skin,
|
||||
description=description,
|
||||
)
|
||||
raise RuntimeError("wait_for_approval can only be called inside a @workflow")
|
||||
|
||||
@@ -3671,6 +3686,8 @@ async def _run_workflow_async(func, checkpoint: dict, input_args: dict):
|
||||
"key": info["key"],
|
||||
"timeout": info.get("timeout"),
|
||||
"form": info.get("form"),
|
||||
"skin": info.get("skin"),
|
||||
"description": info.get("description"),
|
||||
}
|
||||
if mode == "sleep":
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user