wmill 1.567.2__tar.gz → 1.568.0__tar.gz

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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wmill
3
- Version: 1.567.2
3
+ Version: 1.568.0
4
4
  Summary: A client library for accessing Windmill server wrapping the Windmill client API
5
5
  Home-page: https://windmill.dev
6
6
  License: Apache-2.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "wmill"
3
- version = "1.567.2"
3
+ version = "1.568.0"
4
4
  description = "A client library for accessing Windmill server wrapping the Windmill client API"
5
5
  license = "Apache-2.0"
6
6
  homepage = "https://windmill.dev"
@@ -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."""
File without changes
File without changes
File without changes
File without changes
File without changes