예제 #1
0
        def tearDown(orig):
            ret = orig()
            # force a GC to workaround problems with deferreds leaking logcontexts when
            # they are GCed (see the logcontext docs)
            gc.collect()
            set_current_context(SENTINEL_CONTEXT)

            return ret
예제 #2
0
파일: utils.py 프로젝트: samuelyi/synapse
 def wrapped_callback():
     set_current_context(ctx)
     callback(*args, **kwargs)