Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

concurent queries

See original GitHub issue

Issue Description

Peewee recomends to conect() just before request and close() after executing user code.

i.e. from documentation:

database = SqliteDatabase('my_app.db')

def before_request_handler():

def after_request_handler():

On async app handlers are coroitines and requests can be processed while another one waiting bigger data.

Is there way to get another connection from pool and do requsts on it instead of using shared database connection?

Context manager maybe?

related #53

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

rudyrykcommented, Sep 20, 2017

On the line 875 we have:

       if self._async_conn:

So connect_async() is called only once to initialize a connection pool. AsyncDatabase class is not the same as in original peewee, it’s just a single instance per application (usually) - wrapper to real async database driver which handles multiple connections under the hood.

alex-ericommented, Sep 21, 2017

Okey. Thanks alot for disribes!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Concurrent Query Execution
By default, IBM® Cognos® software executes queries in a report sequentially. You can do this by setting advanced server properties for the report...
Read more >
What is considered a concurrent query in BigQuery?
The concurrent queries limit makes reference to the number of statements that are executed simultaneously in BigQuery.
Read more >
How To: Query to find concurrent queries running on the ...
This article provides a SQL query to find all concurrent queries running on same warehouse w.r.t a particular query.
Read more >
Amazon CloudWatch Log announces increased query ...
Amazon CloudWatch Logs customers can now run up to 20 concurrent Log Insights queries for their analytic needs. By increasing the number of ......
Read more >
InfluxQL query management | InfluxDB OSS 1.8 ...
The following configuration settings are in the coordinator section of the configuration file. max-concurrent-queries. The maximum number of running queries ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found