diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-01-12 01:14:42 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-01-12 01:28:24 +0200 |
| commit | ba8228ff3446729f9761b808ce8c1866bc0a6e68 (patch) | |
| tree | a63f2b478ef4dfdda2ffa4e3bcefbab5289d1ac3 /src/server/rz_kernel.py | |
| parent | bcc90ca12b0bb8a37a5ca6e1b72e6b4b629f0668 (diff) | |
rz_kernel: return: a tuple containing the input diff and the result of it's commit
Diffstat (limited to 'src/server/rz_kernel.py')
| -rw-r--r-- | src/server/rz_kernel.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/server/rz_kernel.py b/src/server/rz_kernel.py index 41106ba5..925ebeaf 100644 --- a/src/server/rz_kernel.py +++ b/src/server/rz_kernel.py @@ -1,12 +1,14 @@ """ Rhizi kernel, home to core operation login """ -import db_controller import logging import traceback + +import db_controller from db_op import DBO_diff_commit__attr from db_op import DBO_diff_commit__topo + log = logging.getLogger('rhizi') class RZ_Kernel(object): @@ -17,21 +19,31 @@ class RZ_Kernel(object): - RESP API calls - socket.io calls - future interfaces + + @return: a tuple containing the input diff and the result of it's commit """ op = DBO_diff_commit__topo(topo_diff) try: op_ret = self.db_ctl.exec_op(op) - return op_ret + return topo_diff, op_ret except Exception as e: log.error(e.message) log.error(traceback.print_exc()) raise e def diff_commit__attr(self, attr_diff): + """ + commit a graph attribute diff - this is a common pathway for: + - RESP API calls + - socket.io calls + - future interfaces + + @return: a tuple containing the input diff and the result of it's commit + """ op = DBO_diff_commit__attr(attr_diff) try: op_ret = self.db_ctl.exec_op(op) - return op_ret + return attr_diff, op_ret except Exception as e: log.error(e.message) log.error(traceback.print_exc()) |
