Skip to content
Snippets Groups Projects
Commit f2f79a75 authored by Finn's avatar Finn
Browse files

Added cancellation to operations instance.

parent 8076a527
No related branches found
No related tags found
Loading
......@@ -65,6 +65,13 @@ class OperationsInstance:
except KeyError:
raise InvalidArgumentError("Operation name does not exist: [{}]".format(name))
def cancel_operation(self, name):
try:
self._scheduler.cancel_job_operation(name)
except KeyError:
raise InvalidArgumentError("Operation name does not exist: [{}]".format(name))
def register_message_client(self, name, queue):
try:
self._scheduler.register_client(name, queue)
......@@ -85,7 +92,3 @@ class OperationsInstance:
yield operation
operation = message_queue.get()
yield operation
def cancel_operation(self, name):
# TODO: Cancel leases
raise NotImplementedError("Cancelled operations not supported")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment