mirror of
https://git.wownero.com/dsc/craiyon-irc.git
synced 2024-08-15 01:03:24 +00:00
Include generation time in final message
This commit is contained in:
parent
4801d17520
commit
c215a6b9d5
1 changed files with 3 additions and 1 deletions
4
main.py
4
main.py
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue