Skip to content

Commit 2df0515

Browse files
committed
Use uvloop as the asyncio event loop
1 parent d8ef322 commit 2df0515

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

bot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
__version__ = '2.9.1'
2626

2727
import asyncio
28+
import uvloop
2829
import textwrap
2930
import datetime
3031
import os
@@ -545,5 +546,6 @@ def uptime(self):
545546

546547

547548
if __name__ == '__main__':
549+
uvloop.install()
548550
bot = ModmailBot()
549551
bot.run()

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ parsedatetime==2.4
1111
motor==2.0.0
1212
sanic==18.12.0
1313
dnspython==1.16.0
14+
uvloop==0.12.0

0 commit comments

Comments
 (0)