diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2019-07-08 15:49:23 +0100 |
---|---|---|
committer | Brendan Abolivier <babolivier@matrix.org> | 2019-07-08 15:49:23 +0100 |
commit | 57eacee4f4cff3a663a6e22834a82f9c5783a56d (patch) | |
tree | b5714f78b8c129ad8aca1689e2d7ddecb20c3bed /synapse/util/async_helpers.py | |
parent | Changelog (diff) | |
parent | Update ModuleApi to avoid register(generate_token=True) (#5640) (diff) | |
download | synapse-57eacee4f4cff3a663a6e22834a82f9c5783a56d.tar.xz |
Merge branch 'develop' into babolivier/invite-json
Diffstat (limited to 'synapse/util/async_helpers.py')
-rw-r--r-- | synapse/util/async_helpers.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/synapse/util/async_helpers.py b/synapse/util/async_helpers.py index 7757b8708a..58a6b8764f 100644 --- a/synapse/util/async_helpers.py +++ b/synapse/util/async_helpers.py @@ -23,13 +23,12 @@ from twisted.internet import defer from twisted.internet.defer import CancelledError from twisted.python import failure -from synapse.util import Clock, logcontext, unwrapFirstError - -from .logcontext import ( +from synapse.logging.context import ( PreserveLoggingContext, make_deferred_yieldable, run_in_background, ) +from synapse.util import Clock, unwrapFirstError logger = logging.getLogger(__name__) @@ -153,7 +152,7 @@ def concurrently_execute(func, args, limit): except StopIteration: pass - return logcontext.make_deferred_yieldable( + return make_deferred_yieldable( defer.gatherResults( [run_in_background(_concurrently_execute_inner) for _ in range(limit)], consumeErrors=True, @@ -174,7 +173,7 @@ def yieldable_gather_results(func, iter, *args, **kwargs): Deferred[list]: Resolved when all functions have been invoked, or errors if one of the function calls fails. """ - return logcontext.make_deferred_yieldable( + return make_deferred_yieldable( defer.gatherResults( [run_in_background(func, item, *args, **kwargs) for item in iter], consumeErrors=True, |