Issue
How to use telethon with hypercorn?
How to convert the following line
app.run(loop=client.loop)
In procfile, how to pass the loop
hypercorn file:app -k asyncio
Or how to use hypercorn api?
import asyncio
from hypercorn.asyncio import serve
asyncio.run(serve(app, config)) # value for config
Solution
Try this
import asyncio
from hypercorn.asyncio import serve
loop = client.loop
asyncio.set_event_loop(loop)
loop.run_until_complete(serve(app, config))
Answered By - Umesh Chaudhary
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.