Browse Source

Remove event loop customization

pull/11/head
Madis Mägi 3 months ago
parent
commit
17cc943292
  1. 6
      doorboy.py

6
doorboy.py

@ -2,7 +2,7 @@ from datetime import datetime
from sanic import Sanic, response
from sanic.response import text, json, stream
from motor.motor_asyncio import AsyncIOMotorClient
import uvloop, asyncio
import asyncio
import pymongo
import os
import const
@ -59,6 +59,4 @@ async def view_longpoll(request):
return stream(g, content_type="text/event-stream")
if __name__ == '__main__':
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy()) # swap default event loop to uvloop
loop = asyncio.get_event_loop()
app.run(host='::', debug=False, loop=loop)
app.run(debug=False, host='::')

Loading…
Cancel
Save