summary refs log tree commit diff
path: root/synapse/handlers/room_member.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2023-12-04 14:12:08 +0000
committerErik Johnston <erik@matrix.org>2023-12-04 14:12:08 +0000
commit85151a345d81da13570492c76a0c3da1594ddf54 (patch)
treeb685ce8d86e60990b423a088130263feaddae35e /synapse/handlers/room_member.py
parentTry using uvloop with asyncio (diff)
parentSwitch UNIX socket paths to /run, and add a UNIX socket example for HAProxy (... (diff)
downloadsynapse-erikj/py312_asyncio.tar.xz
Merge remote-tracking branch 'origin/develop' into erikj/py312_asyncio github/erikj/py312_asyncio erikj/py312_asyncio
Diffstat (limited to 'synapse/handlers/room_member.py')
-rw-r--r--synapse/handlers/room_member.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/handlers/room_member.py b/synapse/handlers/room_member.py

index eddc2af9ba..00c2dd854d 100644 --- a/synapse/handlers/room_member.py +++ b/synapse/handlers/room_member.py
@@ -2111,9 +2111,14 @@ class RoomForgetterHandler(StateDeltasHandler): self.pos = room_max_stream_ordering if not self._hs.config.room.forget_on_leave: - # Update the processing position, so that if the server admin turns the - # feature on at a later date, we don't decide to forget every room that - # has ever been left in the past. + # Update the processing position, so that if the server admin turns + # the feature on at a later date, we don't decide to forget every + # room that has ever been left in the past. + # + # We wait for a short time so that we don't "tight" loop just + # keeping the table up to date. + await self._clock.sleep(0.5) + self.pos = self._store.get_room_max_stream_ordering() await self._store.update_room_forgetter_stream_pos(self.pos) return