mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-04 19:34:58 -04:00
Merge pull request #3140 from matrix-org/rav/use_run_in_background
Use run_in_background in preference to preserve_fn
This commit is contained in:
commit
aab2e4da60
22 changed files with 98 additions and 72 deletions
|
@ -19,7 +19,7 @@ from twisted.internet.defer import CancelledError
|
|||
from twisted.python import failure
|
||||
|
||||
from .logcontext import (
|
||||
PreserveLoggingContext, make_deferred_yieldable, preserve_fn
|
||||
PreserveLoggingContext, make_deferred_yieldable, run_in_background
|
||||
)
|
||||
from synapse.util import logcontext, unwrapFirstError
|
||||
|
||||
|
@ -163,7 +163,7 @@ def concurrently_execute(func, args, limit):
|
|||
pass
|
||||
|
||||
return logcontext.make_deferred_yieldable(defer.gatherResults([
|
||||
preserve_fn(_concurrently_execute_inner)()
|
||||
run_in_background(_concurrently_execute_inner)
|
||||
for _ in xrange(limit)
|
||||
], consumeErrors=True)).addErrback(unwrapFirstError)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue