We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
run_as_background_process
1 parent 0e990e6 commit 6a98096Copy full SHA for 6a98096
1 file changed
synapse/metrics/background_process_metrics.py
@@ -300,6 +300,9 @@ async def run() -> Optional[R]:
300
# `sentinel` context and means the new `BackgroundProcessLoggingContext` will
301
# remember the `sentinel` context as its previous context to return to when it
302
# exits and yields control back to the reactor.
303
+ #
304
+ # TODO: I think we could simplify this whole block by using `return run_in_background(run)`
305
+ # which appears to give equivalent behaviour.
306
with PreserveLoggingContext():
307
# The async `run` task is wrapped in a deferred, which will have the side effect
308
# of executing the coroutine.
0 commit comments