Example #1
0
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
Example #2
0
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
Example #3
0
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
Example #4
0
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
Example #5
0
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
Example #6
0
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
Example #7
0
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
Example #8
0
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