I have an async function that fires a emit everytime there is a new message. However sometimes it takes a very long time and if there are several new messages incoming then it doesnt emit all of them.
async def event_message(ctx):
newtext={"username": ctx.author.name,"chat":ctx.content, "color": color}
await socketio.emit("thechat",newtext, room=ctx.channel.name)
if __name__ =='__main__':
web.run_app(app, port=5000)
I am using python-socketio async server with react frontend
Any help would be extremely appreciated thanks.