From ced8785269908bb6da8b51e8dd3d467de52adaf4 Mon Sep 17 00:00:00 2001 From: echel0n Date: Wed, 17 Dec 2014 17:05:05 -0800 Subject: [PATCH] Fixed sickragetv/sickrage-issues#119 - IOLoop was being loaded before daemonizer code due to improper placement in WebHandler class, moved to init. --- sickbeard/webserve.py | 4 ++-- sickbeard/webserveInit.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sickbeard/webserve.py b/sickbeard/webserve.py index 9f249f13..11c85f01 100644 --- a/sickbeard/webserve.py +++ b/sickbeard/webserve.py @@ -204,8 +204,8 @@ class WebHandler(BaseHandler): def __init__(self, *args, **kwargs): super(WebHandler, self).__init__(*args, **kwargs) - io_loop = IOLoop.current() - executor = ThreadPoolExecutor(50) + self.io_loop = IOLoop.current() + self.executor = ThreadPoolExecutor(50) @coroutine @asynchronous diff --git a/sickbeard/webserveInit.py b/sickbeard/webserveInit.py index 8d154dcf..dfc582fb 100644 --- a/sickbeard/webserveInit.py +++ b/sickbeard/webserveInit.py @@ -7,7 +7,7 @@ from sickbeard.webserve import LoginHandler, LogoutHandler, KeyHandler from sickbeard.webapi import ApiHandler from sickbeard import logger from sickbeard.helpers import create_https_certificates, generateApiKey -from tornado.web import Application, StaticFileHandler, HTTPError, RedirectHandler +from tornado.web import Application, StaticFileHandler, RedirectHandler from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.routes import route