Skip to content

Commit 4197d5b

Browse files
authored
Add missing cancel_all_runs function to JobsService (#542)
1 parent cdf917f commit 4197d5b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

databricks_cli/sdk/service.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,14 @@ def cancel_run(self, run_id, headers=None, version=None):
392392
'POST', '/jobs/runs/cancel', data=_data, headers=headers, version=version
393393
)
394394

395+
def cancel_all_runs(self, job_id, headers=None, version=None):
396+
_data = {}
397+
if job_id is not None:
398+
_data['job_id'] = job_id
399+
return self.client.perform_query(
400+
'POST', '/jobs/runs/cancel-all', data=_data, headers=headers, version=version
401+
)
402+
395403
def get_run_output(self, run_id, headers=None, version=None):
396404
_data = {}
397405
if run_id is not None:

0 commit comments

Comments
 (0)