git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
649f51c
)
Ensure we process all pending announcements.
author
CMDR furrycat
<elite@furrycat.net>
Fri, 7 Oct 2016 06:31:10 +0000
(07:31 +0100)
committer
CMDR furrycat
<elite@furrycat.net>
Fri, 7 Oct 2016 06:31:10 +0000
(07:31 +0100)
bot.py
patch
|
blob
|
history
diff --git
a/bot.py
b/bot.py
index
c30a3a8
..
14254f8
100755
(executable)
--- 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)