示例#1
0
def listen():
    try:
        print(etcd_client.list('notifications'))
        logging.info(etcd_client.list('notifications'))
        # Send notifications as email
        # Delete notifications
    except:
        print("No notifications")
        logging.info("No notifications")
示例#2
0
def detect(path, name):
    result = diff(path, name)
    if result['spike']:
        etcd_client.write('notifications/' + str(datetime.datetime.now()),
                          name)
        logging.debug("Notification entry writen to cluster.")
        logging.debug(etcd_client.list('notifications'))
    return result
示例#3
0
async def datasets(request):
    return web.json_response(etcd_client.list('data'))
示例#4
0
async def regtools(request):
    return web.json_response(etcd_client.list('tools'))