예제 #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'))