Parse SYNAPSE_ASYNC_IO_REACTOR env variable & log the reactor on startup#14092
Parse SYNAPSE_ASYNC_IO_REACTOR env variable & log the reactor on startup#14092DMRobertson merged 2 commits intomatrix-org:developfrom sandhose:quenting/ci-asyncioreactor/env
Conversation
| ) | ||
| logging.info("Server hostname: %s", config.server.server_name) | ||
| logging.info("Instance name: %s", hs.get_instance_name()) | ||
| logging.info("Twisted reactor: %s", type(reactor).__name__) |
There was a problem hiding this comment.
I'm assuming that we need to install the asyncio reactor first before we do this? But that should have already happened at import time.
There was a problem hiding this comment.
That's right, the reactor gets installed quite early
| except ImportError: | ||
| pass |
There was a problem hiding this comment.
Not sure what we were hoping to capture in #12135, but we may as well fail loudly. And besides, this is all still experimental.
There was a problem hiding this comment.
See #12135 (comment) for why this is in a try-except.
There was a problem hiding this comment.
CI was fully green on this PR. I guess we had to fixup whatever that comment was talking about as part of the Rust work in #12595 et al?
|
@DMRobertson I don't have merge rights on Synapse, so if you're fine with this change, could you merge it for me? |
|
Sorry, will do. |
This properly parses the
SYNAPSE_ASYNC_IO_REACTORenvironement variable similar to what we do withSYNAPSE_USE_FROZEN_DICTS.It also logs the reactor class currently being used on startup, to help with debugging.
There also was an unecessary try/catch on the reactor installation that I removed.
This is needed for this PR in sytest: matrix-org/sytest#1301
Related: