Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, port, job_manager, mongo_uri):
self.job_manager = job_manager
self.mongo_uri = mongo_uri
self.static_path = os.path.join(os.path.dirname(__file__), "static")
self.routes = Application(
[
(r"/", MainRequestHandler),
(r"/worker/(.*)/job", JobHandler, {"job_manager": job_manager}),
(r"/stats", StatsHandler, {"mongo_uri": self.mongo_uri}),
(r"/stats/(.*)", StatsHandler, {"mongo_uri": self.mongo_uri}),
(r"/data/(.*)", tornado.web.StaticFileHandler, {'path': self.static_path})
],
template_path=os.path.join(os.path.dirname(__file__), "templates"),
static_path= self.static_path)
self.port = port