def _async_add(_obj, _redis): _values = copy_row_to_dict(_obj) _add = { "table": _obj.__tablename__, "key": "uuid." + _obj.uuid, "values": _values } _async_cache(_redis, CACHE_TYPE.CREATE, _add) return
def _async_add(_obj): _values = copy_row_to_dict(_obj) _add = { "table": _obj.__tablename__, "key": "uuid." + _obj.uuid, "values": _values } async_signal_cache_add(_add) return
def _async_update(_obj, _redis): _values = copy_row_to_dict(_obj) if "uuid" not in _values: logging.error("error to update for no uuid %s" % str(_values)) return del _values["uuid"] _update = { "table": _obj.__tablename__, "key": "uuid." + _obj.uuid, "values": _values } _async_cache(_redis, CACHE_TYPE.UPDATE, _update) return
def _async_update(_obj): _values = copy_row_to_dict(_obj) if "uuid" not in _values: logging.error("error to update for no uuid %s" % str(_values)) return del _values["uuid"] _update = { "table": _obj.__tablename__, "key": "uuid." + _obj.uuid, "values": _values } async_signal_cache_update(_update) return