bot icon indicating copy to clipboard operation
bot copied to clipboard

Watch channel queue dictionary changes size during iteration

Open MarkKoz opened this issue 5 years ago • 1 comments

Sentry Issue: BOT-84

I suppose it just needs to create another copy for iteration. Is there a more elegant solution?

RuntimeError: dictionary changed size during iteration
  File "bot/cogs/watchchannels/watchchannel.py", line 183, in consume_messages
    for user_channel_queues in self.consumption_queue.values():

The message queue consume task has failed with:

MarkKoz avatar Sep 26 '20 21:09 MarkKoz

This could be fixed by either making a copy of the dict, or more preferably, by not popping from it when removing the user. However, #999 will still cause issues.

MarkKoz avatar Sep 30 '20 23:09 MarkKoz