Пример #1
0
 def __call__(self, *args, **kw):
     applogger.debug("schedSafe: begin")
     hub.threadingLocal = threading_local()
     hub.begin()
     try:
         ret = self.f(*args, **kw)
         applogger.debug("schedSafe: %s returned %s" % (self.f.__name__, ret))
     finally:
         commit_all()
         end_all()
     applogger.debug("schedSafe: done")
Пример #2
0
 def before_finalize(self):
     database.commit_all()