wmill 1.602.0__py3-none-any.whl → 1.609.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
wmill/client.py
CHANGED
|
@@ -975,7 +975,7 @@ class Windmill:
|
|
|
975
975
|
).json()
|
|
976
976
|
except Exception as e:
|
|
977
977
|
raise Exception("Could not write file to S3") from e
|
|
978
|
-
return S3Object(s3=response["file_key"])
|
|
978
|
+
return S3Object(s3=response["file_key"], storage=s3object["storage"])
|
|
979
979
|
|
|
980
980
|
def sign_s3_objects(self, s3_objects: list[S3Object | str]) -> list[S3Object]:
|
|
981
981
|
"""Sign S3 objects for use by anonymous users in public apps.
|
|
@@ -1179,20 +1179,26 @@ class Windmill:
|
|
|
1179
1179
|
with open(f"/shared/{path}", "r", encoding="utf-8") as f:
|
|
1180
1180
|
return json.load(f)
|
|
1181
1181
|
|
|
1182
|
-
def get_resume_urls(self, approver: str = None) -> dict:
|
|
1182
|
+
def get_resume_urls(self, approver: str = None, flow_level: bool = None) -> dict:
|
|
1183
1183
|
"""Get URLs needed for resuming a flow after suspension.
|
|
1184
1184
|
|
|
1185
1185
|
Args:
|
|
1186
1186
|
approver: Optional approver name
|
|
1187
|
+
flow_level: If True, generate resume URLs for the parent flow instead of the
|
|
1188
|
+
specific step. This allows pre-approvals that can be consumed by any later
|
|
1189
|
+
suspend step in the same flow.
|
|
1187
1190
|
|
|
1188
1191
|
Returns:
|
|
1189
1192
|
Dictionary with approvalPage, resume, and cancel URLs
|
|
1190
1193
|
"""
|
|
1191
1194
|
nonce = random.randint(0, 1000000000)
|
|
1192
1195
|
job_id = os.environ.get("WM_JOB_ID") or "NO_ID"
|
|
1196
|
+
params = {"approver": approver}
|
|
1197
|
+
if flow_level is not None:
|
|
1198
|
+
params["flow_level"] = flow_level
|
|
1193
1199
|
return self.get(
|
|
1194
1200
|
f"/w/{self.workspace}/jobs/resume_urls/{job_id}/{nonce}",
|
|
1195
|
-
params=
|
|
1201
|
+
params=params,
|
|
1196
1202
|
).json()
|
|
1197
1203
|
|
|
1198
1204
|
def request_interactive_slack_approval(
|
|
@@ -1887,16 +1893,19 @@ def get_state_path() -> str:
|
|
|
1887
1893
|
|
|
1888
1894
|
|
|
1889
1895
|
@init_global_client
|
|
1890
|
-
def get_resume_urls(approver: str = None) -> dict:
|
|
1896
|
+
def get_resume_urls(approver: str = None, flow_level: bool = None) -> dict:
|
|
1891
1897
|
"""Get URLs needed for resuming a flow after suspension.
|
|
1892
1898
|
|
|
1893
1899
|
Args:
|
|
1894
1900
|
approver: Optional approver name
|
|
1901
|
+
flow_level: If True, generate resume URLs for the parent flow instead of the
|
|
1902
|
+
specific step. This allows pre-approvals that can be consumed by any later
|
|
1903
|
+
suspend step in the same flow.
|
|
1895
1904
|
|
|
1896
1905
|
Returns:
|
|
1897
1906
|
Dictionary with approvalPage, resume, and cancel URLs
|
|
1898
1907
|
"""
|
|
1899
|
-
return _client.get_resume_urls(approver)
|
|
1908
|
+
return _client.get_resume_urls(approver, flow_level)
|
|
1900
1909
|
|
|
1901
1910
|
|
|
1902
1911
|
@init_global_client
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
|
2
|
-
wmill/client.py,sha256=
|
|
2
|
+
wmill/client.py,sha256=CM6DOs7LQFWDnKFKeViiAUX708vWdxRfvfT0sgcMJOQ,73878
|
|
3
3
|
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
|
4
4
|
wmill/s3_reader.py,sha256=ySd1R2F9krbyhFU_-ogGDZAWQsF2CkPgq7K7xCEvhDU,2662
|
|
5
5
|
wmill/s3_types.py,sha256=gQZRdQoDRp7IRS9MTgGAiHZr1MIdtrbWeN-NJ28kIkA,1804
|
|
6
|
-
wmill-1.
|
|
7
|
-
wmill-1.
|
|
8
|
-
wmill-1.
|
|
6
|
+
wmill-1.609.0.dist-info/METADATA,sha256=Ir13sM7IFpTWzWNOkBijzBreRZxYmvU6NHsL6BSnZKo,2693
|
|
7
|
+
wmill-1.609.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
8
|
+
wmill-1.609.0.dist-info/RECORD,,
|
|
File without changes
|