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")
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
async def datasets(request): return web.json_response(etcd_client.list('data'))
async def regtools(request): return web.json_response(etcd_client.list('tools'))