From aec191fb3841cfd5703097264bedc8cc0dbdddae Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Wed, 1 Nov 2023 07:51:07 +1100 Subject: [PATCH] chat_archiver: Fix misconfiguration where MAX_SERVER_LAG < MAX_DELAY This leads to delayed JOIN/PARTs not being put in their proper batch as it's already been closed. In fact, since each message is re-opening a batch from more than MAX_SERVER_LAG seconds ago, each message becomes one batch. --- chat_archiver/chat_archiver/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chat_archiver/chat_archiver/main.py b/chat_archiver/chat_archiver/main.py index 43dbf31..56fa21f 100644 --- a/chat_archiver/chat_archiver/main.py +++ b/chat_archiver/chat_archiver/main.py @@ -47,8 +47,9 @@ COMMANDS = DELAYED_COMMANDS + [ ] # Assume we're never more than this amount of time behind the server time -# Worst case if too low: multiple output files for same batch that need merging later -MAX_SERVER_LAG = 30 +# Worst case if too low: multiple output files for same batch that need merging later. +# Should be greater than MAX_DELAY. +MAX_SERVER_LAG = 60 # When guessing when a non-timestamped event occurred, pad the possible range # by up to this amount before and after our best guess