From dd24eb8893dac88efb5159ce331d67e5da119ece Mon Sep 17 00:00:00 2001 From: Ruud Date: Sat, 20 Dec 2014 18:49:35 +0100 Subject: [PATCH] Revert "Give response back to the main thread on api calls" This reverts commit 576bcb9f4b389d271da6a88addb50405c8f21dff. Conflicts: couchpotato/api.py --- couchpotato/api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/couchpotato/api.py b/couchpotato/api.py index 2ce4312c..cd01197a 100644 --- a/couchpotato/api.py +++ b/couchpotato/api.py @@ -7,7 +7,6 @@ import urllib from couchpotato.core.helpers.request import getParams from couchpotato.core.logger import CPLog -from tornado.ioloop import IOLoop from tornado.web import RequestHandler, asynchronous @@ -34,7 +33,7 @@ def run_async(func): def run_handler(route, kwargs, callback = None): try: res = api[route](**kwargs) - IOLoop.current().add_callback(callback, res, route) + callback(res, route) except: log.error('Failed doing api request "%s": %s', (route, traceback.format_exc())) callback({'success': False, 'error': 'Failed returning results'}, route)