mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 14:43:53 +01:00
Merge pull request #770 from matrix-org/erikj/transaction_reactor
Run transaction queue on reactor
This commit is contained in:
commit
34b3af3363
1 changed files with 3 additions and 0 deletions
|
@ -20,6 +20,7 @@ from .persistence import TransactionActions
|
|||
from .units import Transaction
|
||||
|
||||
from synapse.api.errors import HttpResponseException
|
||||
from synapse.util.async import run_on_reactor
|
||||
from synapse.util.logutils import log_function
|
||||
from synapse.util.logcontext import PreserveLoggingContext
|
||||
from synapse.util.retryutils import (
|
||||
|
@ -199,6 +200,8 @@ class TransactionQueue(object):
|
|||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def _attempt_new_transaction(self, destination):
|
||||
yield run_on_reactor()
|
||||
|
||||
# list of (pending_pdu, deferred, order)
|
||||
if destination in self.pending_transactions:
|
||||
# XXX: pending_transactions can get stuck on by a never-ending
|
||||
|
|
Loading…
Reference in a new issue