コード例 #1
0
ファイル: update.py プロジェクト: phihag/adhocracy
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
ファイル: queue.py プロジェクト: alex-obi/adhocracy
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
ファイル: index.py プロジェクト: AnonOnWarpath/adhocracy
def gen_id(entity):
    ref = refs.to_ref(entity)
    return hashlib.sha1(ref).hexdigest()