1 ##############################################################################
2 # Copyright (c) 2016 NEC Corporation and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from flask import Flask
12 from flask import request
21 @app.route('/failure', methods=['POST'])
23 app.logger.debug('doctor consumer notified at %s' % time.time())
24 app.logger.debug('received data = %s' % request.data)
25 d = json.loads(request.data)
30 parser = argparse.ArgumentParser(description='Doctor Sample Consumer')
31 parser.add_argument('port', metavar='PORT', type=int, nargs='?',
32 help='the port for consumer')
33 return parser.parse_args()
38 app.run(host="0.0.0.0", port=args.port, debug=True)
41 if __name__ == '__main__':