Commit cd6e094f by Dudás Ádám

vm: public synchronous call method for operations

parent fe6b5e32
...@@ -32,10 +32,7 @@ class Operation: ...@@ -32,10 +32,7 @@ class Operation:
self.instance = instance self.instance = instance
def __call__(self, **kwargs): def __call__(self, **kwargs):
"""Execute the operation synchronously. return self.call(**kwargs)
"""
activity = self.__prelude(kwargs)
return self._exec_op(activity=activity, **kwargs)
def __unicode__(self): def __unicode__(self):
return self.name return self.name
...@@ -73,6 +70,12 @@ class Operation: ...@@ -73,6 +70,12 @@ class Operation:
activity.pk), kwargs=kwargs, activity.pk), kwargs=kwargs,
queue=self.async_queue) queue=self.async_queue)
def call(self, **kwargs):
"""Execute the operation synchronously.
"""
activity = self.__prelude(kwargs)
return self._exec_op(activity=activity, **kwargs)
def check_precond(self): def check_precond(self):
pass pass
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment