swapagarwal / JARVIS-on-Messenger

:speech_balloon: A community-driven python bot that aims to be as simple as possible to serve humans with their everyday tasks
https://m.me/J.A.R.V.I.S.on.Messenger
MIT License
1.35k stars 990 forks source link

Why does the flask server is not using threaded param #985

Open hiruthicShaSS opened 4 years ago

hiruthicShaSS commented 4 years ago

For bug reporting

What are the steps to reproduce this issue?

No bugs, just an suggestion.

What happens?

Not sure, but I dont think it will serve multiple requests at same time

What were you expecting to happen?

Flask should open new threads for each request and will be able to serve multiple request at same time.

What versions of software are you using?

Operating System: Windows 10 x64

For feature suggestion

Feature description:

Any ideas on how to implement it?

Casual questions

Any other comments?

Why is the app.run() method does not uses threaded parameter, without that it can only serve one request at a time right

Any feedback on the project?

varocarras commented 2 years ago

@hiruthicShaSS You are correct, my version uses Thread calls like you suggested, because asynchronous operations would pause and other messages will be missed.

I don't know if this project is still maintained, but if you are interested I built my own using twilio and a much easier setup, I make selenium python bots to make cool stuff like book reservations or flight checks, stock update reminders weekly, etc.

If you are interested in checking it out, I will add you (its private), and would love to see what you think and contribute. I will add you to my setup if you would like to use my instance aswell and we can share it.