コード例 #1
0
ファイル: SyncManager.py プロジェクト: letterix/rasp-temp
def handleUpdate(msg):
    table = msg['table']
    data = json.loads(msg['data'])
    installation = msg['installation']

    if table == 'tags':
        if data['name']:
            return tagHandler.update(data)

        print("ERROR: Could not update table: %s" % (table))
    else:
        print("ERROR: Unsupported table: %s" % (table))

    return False
コード例 #2
0
ファイル: tag.py プロジェクト: letterix/rasp-temp
def put(tag):
    res = tagHandler.update(tag)
    if res:
        return OkResponse("Successfully updated the given tag")
    else:
        return ConflictResponse("Could not update the tag for that controller/installation/customer")