Return nonblock results in main thread

This commit is contained in:
Ruud
2014-12-21 20:19:53 +01:00
parent 5e62801666
commit 7a1b914824
2 changed files with 14 additions and 15 deletions
+2 -1
View File
@@ -14,6 +14,7 @@ from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification
from .index import NotificationIndex, NotificationUnreadIndex
from couchpotato.environment import Env
from tornado.ioloop import IOLoop
log = CPLog(__name__)
@@ -190,7 +191,7 @@ class CoreNotifier(Notification):
while len(self.listeners) > 0 and not self.shuttingDown():
try:
listener, last_id = self.listeners.pop()
listener({
IOLoop.current().add_callback(listener, {
'success': True,
'result': [notification],
})