5858_DEFAULT_EXPECTED_STATUSES : tuple [int , ...] = (200 , 201 , 202 , 204 )
5959_MULTIPLE_BATCH_SIZE = 1000
6060# Concurrent chunk dispatch settings
61- _MAX_WORKERS = 3 # maximum concurrent worker threads; values above this are capped
61+ _MAX_WORKERS = 3 # maximum concurrent worker threads; values above this are capped to _MAX_WORKERS
6262_CHUNK_RETRY_LIMIT = 3 # max retries per chunk on transient errors
6363_CHUNK_RETRY_DEFAULT_WAIT = 60 # seconds to wait when Retry-After header is absent
6464_CHUNK_RETRY_JITTER_MAX = 5 # seconds of random jitter added to Retry-After to desynchronise workers
@@ -68,7 +68,7 @@ def _dispatch_chunks(fn: Callable, chunks: List, max_workers: int) -> List:
6868 """Dispatch ``fn(chunk)`` for each chunk, sequentially or concurrently.
6969
7070 If ``max_workers`` exceeds ``_MAX_WORKERS`` (3) a :class:`UserWarning` is
71- issued and the value is capped.
71+ issued and the value is capped to ``_MAX_WORKERS`` .
7272
7373 When ``max_workers == 1`` or there is only one chunk, runs sequentially
7474 with no thread overhead. When ``max_workers > 1`` and there are multiple
@@ -578,7 +578,7 @@ def _upsert_multiple(
578578 Must be the same length as ``alternate_keys``.
579579 :type records: ``list[dict[str, Any]]``
580580 :param max_workers: Maximum number of concurrent worker threads for chunk dispatch.
581- Values above ``_MAX_WORKERS`` are silently capped.
581+ Values above ``_MAX_WORKERS`` are capped to ``_MAX_WORKERS`` .
582582 :type max_workers: ``int``
583583
584584 :return: ``None``
@@ -761,7 +761,7 @@ def _update_multiple(
761761 :param records: List of patch dictionaries. Each must include the true primary key attribute (e.g. ``accountid``) and one or more fields to update.
762762 :type records: ``list[dict[str, Any]]``
763763 :param max_workers: Maximum number of concurrent worker threads for chunk dispatch.
764- Values above ``_MAX_WORKERS`` are silently capped.
764+ Values above ``_MAX_WORKERS`` are capped to ``_MAX_WORKERS`` .
765765 :type max_workers: ``int``
766766 :return: ``None``
767767 :rtype: ``None``
0 commit comments