示例#1
0
def post_update(entity, operation):
    if has_queue():
        entity_ref = to_ref(entity)
        if entity_ref is None:
            return
        data = dict(operation=operation, entity=entity_ref)
        post_message(UPDATE_SERVICE, json.dumps(data))
示例#2
0
def update_entity(entity, operation):
    entity_ref = to_ref(entity)
    if entity_ref is None:
        return
    data = dict(operation=operation, entity=entity_ref)
    data_json = json.dumps(data)
    return handle_update(data_json)
示例#3
0
文件: index.py 项目: alkadis/vcv
def gen_id(entity):
    ref = refs.to_ref(entity)
    return hashlib.sha1(ref).hexdigest()
示例#4
0
def gen_id(entity):
    ref = refs.to_ref(entity)
    return hashlib.sha1(ref).hexdigest()