Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 3 additions & 1 deletion .github/workflows/beeper-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ jobs:
sudo apt-get install -qqy libolm3 libolm-dev
go install -v github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- name: Run Complement
run: ./scripts-dev/complement.sh
run: ./scripts-dev/complement.sh -timeout 2h
env:
COMPLEMENT_DIR: complement
WORKERS: 1
POSTGRES: 1

# Builds

Expand Down
3 changes: 2 additions & 1 deletion docker/complement/conf/start_for_complement.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ if [[ -n "$SYNAPSE_COMPLEMENT_USE_WORKERS" ]]; then
fi
log "Workers requested: $SYNAPSE_WORKER_TYPES"
# Improve startup times by using a launcher based on fork()
export SYNAPSE_USE_EXPERIMENTAL_FORKING_LAUNCHER=1
# NOTE: does not work with Beeper changes (external_sharded_cache)
# export SYNAPSE_USE_EXPERIMENTAL_FORKING_LAUNCHER=1
else
# Empty string here means 'main process only'
export SYNAPSE_WORKER_TYPES=""
Expand Down
2 changes: 1 addition & 1 deletion synapse/push/httppusher.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ async def dispatch_push_event(
rejected push keys otherwise. If this array is empty, the push fully
succeeded.
"""
priority = "low"
priority = "high" # Beeper: always use high priority notifications
if (
event.type == EventTypes.Encrypted
or tweaks.get("highlight")
Expand Down
4 changes: 3 additions & 1 deletion synapse/replication/tcp/external_sharded_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@

from synapse.logging import opentracing
from synapse.logging.context import make_deferred_yieldable, run_in_background
from synapse.replication.tcp.redis import lazyConnection
from synapse.util import unwrapFirstError

if TYPE_CHECKING:
Expand Down Expand Up @@ -82,6 +81,9 @@ def __init__(self, hs: "HomeServer"):
self._reactor = hs.get_reactor()

if hs.config.redis.redis_enabled and hs.config.redis.cache_shard_hosts:
# Only import this if we're going to use it, as it can raise an AttributeError when using the forking launcher
from synapse.replication.tcp.redis import lazyConnection

for shard in hs.config.redis.cache_shard_hosts:
logger.info(
"Connecting to redis (host=%r port=%r) for external cache",
Expand Down