Liking cljdoc? Tell your friends :D

metabase.query-processor.middleware.async-wait

Middleware that limits the number of concurrent queries for each database.

Each connected database is limited to a maximum of 15 simultaneous queries (configurable) using these methods; any additional queries will park the thread. Super-useful for writing high-performance API endpoints. Prefer these methods to the old-school synchronous versions.

How is this achieved? For each Database, we'll maintain a thread pool executor to limit the number of simultaneous queries.

Middleware that limits the number of concurrent queries for each database.

Each connected database is limited to a maximum of 15 simultaneous queries (configurable) using these methods; any
additional queries will park the thread. Super-useful for writing high-performance API endpoints. Prefer these
methods to the old-school synchronous versions.

How is this achieved? For each Database, we'll maintain a thread pool executor to limit the number of simultaneous
queries.
raw docstring

destroy-thread-pool!clj

(destroy-thread-pool! database-or-id)

Destroy the QP thread pool for a Database (done automatically when DB is deleted.)

Destroy the QP thread pool for a Database (done automatically when DB is deleted.)
sourceraw docstring

max-simultaneous-queries-per-dbclj

(max-simultaneous-queries-per-db)
(max-simultaneous-queries-per-db new-value)

Maximum number of simultaneous queries to allow per connected Database.

max-simultaneous-queries-per-db is a integer Setting. You can get its value by calling:

(max-simultaneous-queries-per-db)

and set its value by calling:

(max-simultaneous-queries-per-db <new-value>)

You can also set its value with the env var MB_MAX_SIMULTANEOUS_QUERIES_PER_DB.

Clear its value by calling:

(max-simultaneous-queries-per-db nil)

Its default value is 15.

Maximum number of simultaneous queries to allow per connected Database.

`max-simultaneous-queries-per-db` is a integer Setting. You can get its value by calling:

    (max-simultaneous-queries-per-db)

and set its value by calling:

    (max-simultaneous-queries-per-db <new-value>)

You can also set its value with the env var `MB_MAX_SIMULTANEOUS_QUERIES_PER_DB`.

Clear its value by calling:

    (max-simultaneous-queries-per-db nil)

Its default value is `15`.
sourceraw docstring

wait-for-turnclj

(wait-for-turn qp)

Middleware that throttles the number of concurrent queries for each connected database, parking the thread until it is allowed to run.

Middleware that throttles the number of concurrent queries for each connected database, parking the thread until it
is allowed to run.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close