Skip to content

Commit

Permalink
new logger for manager
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Jul 22, 2015
1 parent 8e219bf commit 2dc8598
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/appier/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@

class AsyncManager(object):

def __init__(self, owner):
object.__init__(self)
self.owner = owner

def start(self):
pass

Expand Down Expand Up @@ -93,4 +97,6 @@ def handler(self):
try: item = self.queue.pop(0)
finally: self.condition.release()
method, args, kwargs = item
method(*args, **kwargs)
try: method(*args, **kwargs)
except BaseException, exception:
self.owner.log_error(exception)
2 changes: 1 addition & 1 deletion src/appier/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def __init__(
self.ssl = False
self.local_url = None
self.cache_d = self.cache_c()
self.manager = async.QueueManager()
self.manager = async.QueueManager(self)
self.routes_v = None
self.tid = None
self.type = "default"
Expand Down

0 comments on commit 2dc8598

Please sign in to comment.