Fix starting cherrypy server

This commit is contained in:
JonnyWong16 2019-11-23 19:21:40 -08:00
parent 4c98b0a43d
commit 5f237c7c71

View file

@ -139,6 +139,7 @@ def initialize(options):
conf = { conf = {
'/': { '/': {
'engine.timeout_monitor.on': False,
'tools.staticdir.root': os.path.join(plexpy.PROG_DIR, 'data'), 'tools.staticdir.root': os.path.join(plexpy.PROG_DIR, 'data'),
'tools.proxy.on': bool(options['http_proxy']), 'tools.proxy.on': bool(options['http_proxy']),
'tools.gzip.on': True, 'tools.gzip.on': True,
@ -248,8 +249,6 @@ def initialize(options):
} }
} }
# Prevent time-outs
cherrypy.engine.timeout_monitor.unsubscribe()
cherrypy.tree.mount(WebInterface(), options['http_root'], config=conf) cherrypy.tree.mount(WebInterface(), options['http_root'], config=conf)
if plexpy.HTTP_ROOT != '/': if plexpy.HTTP_ROOT != '/':
cherrypy.tree.mount(BaseRedirect(), '/') cherrypy.tree.mount(BaseRedirect(), '/')
@ -257,7 +256,7 @@ def initialize(options):
try: try:
logger.info("Tautulli WebStart :: Starting Tautulli web server on %s://%s:%d%s", protocol, logger.info("Tautulli WebStart :: Starting Tautulli web server on %s://%s:%d%s", protocol,
options['http_host'], options['http_port'], options['http_root']) options['http_host'], options['http_port'], options['http_root'])
cherrypy.process.servers.check_port(str(options['http_host']), options['http_port']) #cherrypy.process.servers.check_port(str(options['http_host']), options['http_port'])
if not plexpy.DEV: if not plexpy.DEV:
cherrypy.server.start() cherrypy.server.start()
else: else: