Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé
Classe « QueuePool »

Constructeur sqlalchemy.QueuePool.__init__

Signature de la constructeur __init__

def __init__(self, creator: 'Union[_CreatorFnType, _CreatorWRecFnType]', pool_size: 'int' = 5, max_overflow: 'int' = 10, timeout: 'float' = 30.0, use_lifo: 'bool' = False, **kw: 'Any') 

Description

help(QueuePool.__init__)

Construct a QueuePool.

:param creator: a callable function that returns a DB-API
  connection object, same as that of :paramref:`_pool.Pool.creator`.

:param pool_size: The size of the pool to be maintained,
  defaults to 5. This is the largest number of connections that
  will be kept persistently in the pool. Note that the pool
  begins with no connections; once this number of connections
  is requested, that number of connections will remain.
  ``pool_size`` can be set to 0 to indicate no size limit; to
  disable pooling, use a :class:`~sqlalchemy.pool.NullPool`
  instead.

:param max_overflow: The maximum overflow size of the
  pool. When the number of checked-out connections reaches the
  size set in pool_size, additional connections will be
  returned up to this limit. When those additional connections
  are returned to the pool, they are disconnected and
  discarded. It follows then that the total number of
  simultaneous connections the pool will allow is pool_size +
  `max_overflow`, and the total number of "sleeping"
  connections the pool will allow is pool_size. `max_overflow`
  can be set to -1 to indicate no overflow limit; no limit
  will be placed on the total number of concurrent
  connections. Defaults to 10.

:param timeout: The number of seconds to wait before giving up
  on returning a connection. Defaults to 30.0. This can be a float
  but is subject to the limitations of Python time functions which
  may not be reliable in the tens of milliseconds.

:param use_lifo: use LIFO (last-in-first-out) when retrieving
  connections instead of FIFO (first-in-first-out). Using LIFO, a
  server-side timeout scheme can reduce the number of connections used
  during non-peak periods of use.   When planning for server-side
  timeouts, ensure that a recycle or pre-ping strategy is in use to
  gracefully handle stale connections.

  .. versionadded:: 1.3

  .. seealso::

    :ref:`pool_use_lifo`

    :ref:`pool_disconnects`

:param \**kw: Other keyword arguments including
  :paramref:`_pool.Pool.recycle`, :paramref:`_pool.Pool.echo`,
  :paramref:`_pool.Pool.reset_on_return` and others are passed to the
  :class:`_pool.Pool` constructor.



Vous êtes un professionnel et vous avez besoin d'une formation ? Mise en oeuvre d'IHM
avec Qt et PySide6
Voir le programme détaillé