Comments (5)
This needs further looking into but we have two execution paths.
Regular (non-async
) functions are handled by a thread pool, currently hardcoded to handle up to 10 concurrent requests.
Requests run outside the MainThread and don't block its execution.
async
functions are currently handled by the MainThread
. They are expected to await
as soon as possible to release the work to other tasks.
This means that in the above code, where time.sleep(5)
is used, await asyncio.sleep(5)
should have been used instead.
However this is rather unintuitive as it blocks new requests.
The source of the issue is here.
This needs further reflection as I'm not sure threading the work is safe. @jneeven 's advice would be welcome here as this looks like a deliberate design choice.
from mmpy_bot.
Related Issues (20)
- Slash-command support HOT 2
- How to handle button click in interactive messages HOT 1
- Configuration mmpy-bot with mattermost HOT 10
- Issues with mmpy_bot, click and spaces HOT 2
- Handling of --help is broken for click HOT 7
- How to deploy the bot on EC2 or Google Cloud HOT 2
- Errno 111 Connection refused HOT 6
- Click help text formatting sugestion HOT 4
- Duplicate content in click command help output HOT 1
- Two Traceback errors finded HOT 8
- Send a message direct to user who joins room HOT 2
- RuntimeError: this event loop is already running. HOT 9
- No connection with docker image 2.0.0 and MM7.1.3 HOT 2
- Improvement: Add `type` optional param for `create_post(...)` function HOT 7
- [Question] Register plugins at runtime HOT 1
- Scheduled responses to channel instead of reply HOT 5
- How to send files to bot directly for some postpone processing? HOT 3
- HTTP/1.1 404 Not Found : Wrong api endpoint HOT 4
- dev requirements inside main project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mmpy_bot.