tripleee / sloshy

Sloshy the Thawman, a simple chatbot to keep rooms alive on Stack Overflow / Stack Exchange
6 stars 11 forks source link

Some rooms take way too long to scan #78

Closed tripleee closed 4 months ago

tripleee commented 7 months ago

In particular, https://chat.stackexchange.com/transcript/111122/2024/2/12 took more than 10 minutes, causing CircleCI to time out until I tweaked up the timeout.

My suspicion is that something in the logic is wrong which causes Sloshy to scan the history way back longer than it really should.

tripleee commented 4 months ago

The reasons some rooms take a really long time is that we have to scan back to find 15 messages from Sloshy if the room has no human users. (To recap, the aggressive threshold is triggered if there are less than 15 messages or only messages from a single non-system user.) Perhaps the logic could be relaxed to check the interval between two Sloshy messages, and conclude that the aggressive threshold is unnecessary if the interval is more than 5 days. A more crude solution is to manually add messages from a new non-system user to the problematic rooms.

tripleee commented 4 months ago

First scan after fix ran in less than 30 minutes. I'm leaving #87 open for a while to track this over the next few days.