Skip to content
Snippets Groups Projects
Commit 1e2090bf authored by Martin Blanchard's avatar Martin Blanchard
Browse files

scheduler.py: Implement operation cancellation

parent a6c06f1a
No related branches found
No related tags found
Loading
......@@ -128,3 +128,13 @@ class Scheduler:
def get_job_operation(self, job_name):
"""Returns the operation associated to job."""
return self.jobs[job_name].operation
def cancel_job_operation(self, job_name):
""""Cancels the underlying operation of a given job.
This will also cancel any job's lease that may have been issued.
Args:
job_name (str): name of the job holding the operation to cancel.
"""
self.jobs[job_name].cancel_operation()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment