summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-01-20 13:04:50 +0200
committerLV-426 <lv-426@taproot.org.il>2015-01-20 14:02:10 +0200
commit5dfa28e3ccacae55c9f71fc5135de53e065ac84e (patch)
tree957e0ce111c12a92dfde792ae4f1b606b351a754 /src
parenteac4125bf02c7c19953d6173e3e0191244a18a82 (diff)
rz_kernel: apply (diff_obj, op, op_ret) yield return approach on diff commit
Diffstat (limited to 'src')
-rw-r--r--src/server/rz_kernel.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/rz_kernel.py b/src/server/rz_kernel.py
index 925ebeaf..e8d81270 100644
--- a/src/server/rz_kernel.py
+++ b/src/server/rz_kernel.py
@@ -13,7 +13,7 @@ log = logging.getLogger('rhizi')
class RZ_Kernel(object):
- def diff_commit__topo(self, topo_diff):
+ def diff_commit__topo(self, topo_diff, ctx={}):
"""
commit a graph topology diff - this is a common pathway for:
- RESP API calls
@@ -24,14 +24,14 @@ class RZ_Kernel(object):
"""
op = DBO_diff_commit__topo(topo_diff)
try:
- op_ret = self.db_ctl.exec_op(op)
- return topo_diff, op_ret
+ for op, op_ret in self.db_ctl.exec_op(op):
+ yield topo_diff, op, op_ret
except Exception as e:
log.error(e.message)
log.error(traceback.print_exc())
raise e
- def diff_commit__attr(self, attr_diff):
+ def diff_commit__attr(self, attr_diff, ctx={}):
"""
commit a graph attribute diff - this is a common pathway for:
- RESP API calls
@@ -42,8 +42,8 @@ class RZ_Kernel(object):
"""
op = DBO_diff_commit__attr(attr_diff)
try:
- op_ret = self.db_ctl.exec_op(op)
- return attr_diff, op_ret
+ for op, op_ret in self.db_ctl.exec_op(op):
+ yield attr_diff, op, op_ret
except Exception as e:
log.error(e.message)
log.error(traceback.print_exc())