Include generation time in final message

This commit is contained in:
dsc 2022-07-21 18:12:29 +02:00
parent 4801d17520
commit c215a6b9d5

View file

@ -206,6 +206,7 @@ async def main():
# main loop
while True:
now = datetime.now()
random.shuffle(TASK_QUEUE._queue)
task = await TASK_QUEUE.get()
@ -237,7 +238,8 @@ async def main():
_lower_author_task_count(task.author)
bot.send("PRIVMSG", target=task.channel, message=f"{url} \"{task.term}\" ({task.author}) ")
completed_secs = (datetime.now() - now).total_seconds()
bot.send("PRIVMSG", target=task.channel, message=f"{url} \"{task.term}\" ({completed_secs}sec, {task.author}) ")
await asyncio.sleep(10)
loop = asyncio.get_event_loop()