Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Allow enabling the asyncio reactor in complement #14858

Merged
merged 14 commits into from
Feb 1, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions synapse/app/complement_fork_starter.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ def _worker_entrypoint(
signal.signal(sig, handler)

# Install the asyncio reactor if the SYNAPSE_ASYNC_IO_REACTOR is set to 1.
realtyem marked this conversation as resolved.
Show resolved Hide resolved
# It unsets the environ variable to avoid re-installing it in synapse/__init__.py
if strtobool(os.environ.pop("SYNAPSE_ASYNC_IO_REACTOR", "0")):
if strtobool(
os.environ.get("SYNAPSE_COMPLEMENT_FORKING_LAUNCHER_ASYNC_IO_REACTOR", "0")
realtyem marked this conversation as resolved.
Show resolved Hide resolved
):
import asyncio

from twisted.internet.asyncioreactor import AsyncioSelectorReactor
Expand Down