mirror of
https://mau.dev/maunium/synapse.git
synced 2024-11-14 14:01:59 +01:00
Run _handle_queued_pdus
as a background process (#12041)
... to ensure it gets a proper log context, mostly.
This commit is contained in:
parent
235d2916ce
commit
81364db49b
2 changed files with 5 additions and 2 deletions
1
changelog.d/12041.misc
Normal file
1
changelog.d/12041.misc
Normal file
|
@ -0,0 +1 @@
|
|||
After joining a room, create a dedicated logcontext to process the queued events.
|
|
@ -49,8 +49,8 @@ from synapse.logging.context import (
|
|||
make_deferred_yieldable,
|
||||
nested_logging_context,
|
||||
preserve_fn,
|
||||
run_in_background,
|
||||
)
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.replication.http.federation import (
|
||||
ReplicationCleanRoomRestServlet,
|
||||
ReplicationStoreRoomOnOutlierMembershipRestServlet,
|
||||
|
@ -559,7 +559,9 @@ class FederationHandler:
|
|||
# lots of requests for missing prev_events which we do actually
|
||||
# have. Hence we fire off the background task, but don't wait for it.
|
||||
|
||||
run_in_background(self._handle_queued_pdus, room_queue)
|
||||
run_as_background_process(
|
||||
"handle_queued_pdus", self._handle_queued_pdus, room_queue
|
||||
)
|
||||
|
||||
async def do_knock(
|
||||
self,
|
||||
|
|
Loading…
Reference in a new issue