in mutornadomon/external_interfaces/http_endpoints.py [0:0]
def start(self, monitor, server_port):
self.server_port = server_port
self.profiler_app = tornado.web.Application([
(r'/profiler', TornadoStatsHandler, {
'monitor': monitor,
'request_filter': self.request_filter
}),
])
# If listening is started directly then IOLoop started by service will
# cause issue resulting in high CPU usage. So start listening after
# IOLoop is started by the service
io_loop = IOLoop.current(instance=False)
if io_loop is None:
logger.error('Cannot initialize Mutornadomon without IOLoop')
else:
io_loop.add_callback(self.start_listen)