From 1a020cec8589d5d408504c89bfa326212d322672 Mon Sep 17 00:00:00 2001 From: CMDR furrycat Date: Fri, 7 Oct 2016 07:31:10 +0100 Subject: [PATCH] Ensure we process all pending announcements. --- bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index c30a3a8..14254f8 100755 --- a/bot.py +++ b/bot.py @@ -1172,8 +1172,8 @@ def announce(announcement): def do_announcements(): waittime = 60 while True: - now = time.time() - for announcement in db.get_announcements(client): + # Convert to list because we will be sharing the cursor. + for announcement in list(db.get_announcements(client)): yield from announce(announcement) yield from asyncio.sleep(waittime) -- 2.7.4