FIFO queue cannot reduce if no valid quotes exist after filling rquote_used #318

Open
opened 2026-05-24 22:19:01 -04:00 by Sirdog · 0 comments
Owner

While working on #292 I discovered that if the rquote_used database table becomes filled with every message in the defined the quotes_channel_id channel that, even if max_old_quotes is reduced, EnduraBot is still stuck.

This is because the method used that reduces the queue when max_old_quotes is made smaller (see #293) runs after a valid quote is selected and set for insertion into rquote_used. If no valid message is available to select to begin with then the method never runs.

Eventually I need to rework this logic so that the queue can reduce itself even in a situation where every quote in the channel is in rquote_used. The stop gap introduced by #292 is telling the bot operator to clear the queue manually.

While working on #292 I discovered that if the `rquote_used` database table becomes filled with every message in the defined the `quotes_channel_id` channel that, even if `max_old_quotes` is reduced, EnduraBot is still stuck. This is because the method used that reduces the queue when `max_old_quotes` is made smaller (see #293) runs _after_ a valid quote is selected and set for insertion into `rquote_used`. If no valid message is available to select _to begin with_ then the method never runs. Eventually I need to rework this logic so that the queue can reduce itself even in a situation where every quote in the channel is in `rquote_used`. The stop gap introduced by #292 is telling the bot operator to clear the queue manually.
Sirdog added this to the v2.15.0 milestone 2026-05-24 22:19:01 -04:00
Sirdog self-assigned this 2026-05-24 22:19:01 -04:00
Sign in to join this conversation.
No description provided.