wmill 1.567.3__py3-none-any.whl → 1.568.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.
Potentially problematic release.
This version of wmill might be problematic. Click here for more details.
wmill/client.py
CHANGED
|
@@ -337,6 +337,27 @@ class Windmill:
|
|
|
337
337
|
|
|
338
338
|
time.sleep(0.5)
|
|
339
339
|
|
|
340
|
+
def cancel_job(self, job_id: str, reason: str = None) -> str:
|
|
341
|
+
"""Cancel a specific job by ID.
|
|
342
|
+
|
|
343
|
+
Args:
|
|
344
|
+
job_id: UUID of the job to cancel
|
|
345
|
+
reason: Optional reason for cancellation
|
|
346
|
+
|
|
347
|
+
Returns:
|
|
348
|
+
Response message from the cancel endpoint
|
|
349
|
+
"""
|
|
350
|
+
logger.info(f"cancelling job: {job_id}")
|
|
351
|
+
|
|
352
|
+
payload = {"reason": reason or "cancelled via cancel_job method"}
|
|
353
|
+
|
|
354
|
+
response = self.post(
|
|
355
|
+
f"/w/{self.workspace}/jobs_u/queue/cancel/{job_id}",
|
|
356
|
+
json=payload,
|
|
357
|
+
)
|
|
358
|
+
|
|
359
|
+
return response.text
|
|
360
|
+
|
|
340
361
|
def cancel_running(self) -> dict:
|
|
341
362
|
"""Cancel currently running executions of the same script."""
|
|
342
363
|
logger.info("canceling running executions of this script")
|
|
@@ -1363,6 +1384,20 @@ def send_teams_message(
|
|
|
1363
1384
|
return _client.send_teams_message(conversation_id, text, success, card_block)
|
|
1364
1385
|
|
|
1365
1386
|
|
|
1387
|
+
@init_global_client
|
|
1388
|
+
def cancel_job(job_id: str, reason: str = None) -> str:
|
|
1389
|
+
"""Cancel a specific job by ID.
|
|
1390
|
+
|
|
1391
|
+
Args:
|
|
1392
|
+
job_id: UUID of the job to cancel
|
|
1393
|
+
reason: Optional reason for cancellation
|
|
1394
|
+
|
|
1395
|
+
Returns:
|
|
1396
|
+
Response message from the cancel endpoint
|
|
1397
|
+
"""
|
|
1398
|
+
return _client.cancel_job(job_id, reason)
|
|
1399
|
+
|
|
1400
|
+
|
|
1366
1401
|
@init_global_client
|
|
1367
1402
|
def cancel_running() -> dict:
|
|
1368
1403
|
"""Cancel currently running executions of the same script."""
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
wmill/__init__.py,sha256=nGZnQPezTdrBnBW1D0JqUtm75Gdf_xi3tAcPGwHRZ5A,46
|
|
2
|
-
wmill/client.py,sha256=
|
|
2
|
+
wmill/client.py,sha256=N-HehJJ8raRaz8z8gxHoWlbui1VnFcYm4_6vlQgzowM,51335
|
|
3
3
|
wmill/py.typed,sha256=8PjyZ1aVoQpRVvt71muvuq5qE-jTFZkK-GLHkhdebmc,26
|
|
4
4
|
wmill/s3_reader.py,sha256=Rq6m9T_SxReIi0OJA28FXSddHQRk2wUJCfbcw_FQ8Ao,2149
|
|
5
5
|
wmill/s3_types.py,sha256=D4W1miV41Sa0YC_p7Jqr8j8Sp4Z2GgFAVsFR0ZYIrVM,1235
|
|
6
|
-
wmill-1.
|
|
7
|
-
wmill-1.
|
|
8
|
-
wmill-1.
|
|
6
|
+
wmill-1.568.0.dist-info/METADATA,sha256=4mDV2JKHrto6igyJliGrwBbJFNTmViYdE8cL98vMKSE,2693
|
|
7
|
+
wmill-1.568.0.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
8
|
+
wmill-1.568.0.dist-info/RECORD,,
|
|
File without changes
|