vgi-python 0.43.0__py3-none-any.whl → 0.43.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- vgi/client/client.py +20 -3
- {vgi_python-0.43.0.dist-info → vgi_python-0.43.1.dist-info}/METADATA +1 -1
- {vgi_python-0.43.0.dist-info → vgi_python-0.43.1.dist-info}/RECORD +6 -6
- {vgi_python-0.43.0.dist-info → vgi_python-0.43.1.dist-info}/WHEEL +0 -0
- {vgi_python-0.43.0.dist-info → vgi_python-0.43.1.dist-info}/entry_points.txt +0 -0
- {vgi_python-0.43.0.dist-info → vgi_python-0.43.1.dist-info}/licenses/LICENSE +0 -0
vgi/client/client.py
CHANGED
|
@@ -90,6 +90,7 @@ import subprocess
|
|
|
90
90
|
import sys
|
|
91
91
|
import threading
|
|
92
92
|
from collections.abc import Callable, Generator, Iterator, Sequence
|
|
93
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
93
94
|
from contextlib import AbstractContextManager
|
|
94
95
|
from dataclasses import dataclass, field, replace
|
|
95
96
|
from queue import Queue
|
|
@@ -1460,13 +1461,29 @@ class Client(CatalogClientMixin, AggregateClientMixin):
|
|
|
1460
1461
|
def _close_secondary_workers(self, *, force: bool = False) -> None:
|
|
1461
1462
|
"""Close and stop all secondary (additional) workers.
|
|
1462
1463
|
|
|
1464
|
+
The workers are stopped concurrently. Each stop can wait on a process
|
|
1465
|
+
exit: a direct worker's own, or, for a pooled worker, that of the idle
|
|
1466
|
+
worker the pool evicts to make room once it is past ``max_idle``. A
|
|
1467
|
+
graceful exit is mostly interpreter teardown (~0.2 s), so stopping a
|
|
1468
|
+
24-way scan one worker at a time spent ~4 s here.
|
|
1469
|
+
|
|
1463
1470
|
Args:
|
|
1464
1471
|
force: Kill direct subprocess workers rather than closing them gracefully
|
|
1465
1472
|
(see ``_stop_worker``).
|
|
1473
|
+
|
|
1474
|
+
Raises:
|
|
1475
|
+
Exception: The first error a stop raised, once every worker has been
|
|
1476
|
+
stopped.
|
|
1466
1477
|
"""
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1478
|
+
workers, self._additional_workers = self._additional_workers, []
|
|
1479
|
+
if len(workers) <= 1:
|
|
1480
|
+
for worker in workers:
|
|
1481
|
+
self._stop_worker(worker, force=force)
|
|
1482
|
+
return
|
|
1483
|
+
with ThreadPoolExecutor(max_workers=len(workers), thread_name_prefix="vgi-stop-worker") as executor:
|
|
1484
|
+
futures = [executor.submit(self._stop_worker, worker, force=force) for worker in workers]
|
|
1485
|
+
for future in futures:
|
|
1486
|
+
future.result()
|
|
1470
1487
|
|
|
1471
1488
|
def _join_threads(self, threads: list[threading.Thread]) -> None:
|
|
1472
1489
|
"""Wait for all threads to complete with timeout.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vgi-python
|
|
3
|
-
Version: 0.43.
|
|
3
|
+
Version: 0.43.1
|
|
4
4
|
Summary: Vector Gateway Interface - Connect DuckDB to external programs via Apache Arrow
|
|
5
5
|
Project-URL: Homepage, https://query.farm
|
|
6
6
|
Project-URL: Repository, https://github.com/Query-farm/vgi-python
|
|
@@ -147,7 +147,7 @@ vgi/client/cli_table.py,sha256=H1xrKZF5yYmSe55YSrLWXGIXPmuGuzQcncEBvqL43zs,26498
|
|
|
147
147
|
vgi/client/cli_transaction.py,sha256=TDW0ZrBy8XM_eYSkYk5ewEsnozfzDJOlopd66Fm7OOE,3142
|
|
148
148
|
vgi/client/cli_utils.py,sha256=ykh7XK-yzcW6WGED2_DhPLIVPSyVG3KUdllV5ztBicw,17458
|
|
149
149
|
vgi/client/cli_view.py,sha256=0qhxoS91-zFMjq8V_Fb0PNW-YDxERu8-zPpxSFEE-G8,8490
|
|
150
|
-
vgi/client/client.py,sha256=
|
|
150
|
+
vgi/client/client.py,sha256=fSFmWbnLItcj8Q1uXWR-mMURngW3R9YKgDbUu702gIQ,174245
|
|
151
151
|
vgi/client/errors.py,sha256=cSN65cyQMk3crwZCz1IdPErK3mtlEkTNpu-nuQUDOQE,1633
|
|
152
152
|
vgi/http/__init__.py,sha256=hlOwOVcoZqmEKVGk7ganOdr5ryRSpEhLBF9sRD7BkYc,608
|
|
153
153
|
vgi/http/demo_storage.py,sha256=830s-H61thozC3eEuqdnwCpYFfvoJRq9vjyuXa5OURo,8769
|
|
@@ -160,8 +160,8 @@ vgi/transactor/_duckdb_compat.py,sha256=sXVZ9JLKAQyGR1BjWczSwdQEavtr-TcZPoVZZnTr
|
|
|
160
160
|
vgi/transactor/client.py,sha256=7DTeMksogsw6ANjQjGOPpKYrV76rg4_kGjktMJf54jg,4486
|
|
161
161
|
vgi/transactor/protocol.py,sha256=v59IvrKnuvwOXvn_HEcBAbCzDVcx0akgKN0R1mChXg0,5034
|
|
162
162
|
vgi/transactor/server.py,sha256=fJi72oaS8PiOI3rFW0MdetGBFEzFBkLdlDAMmbB50Uw,32663
|
|
163
|
-
vgi_python-0.43.
|
|
164
|
-
vgi_python-0.43.
|
|
165
|
-
vgi_python-0.43.
|
|
166
|
-
vgi_python-0.43.
|
|
167
|
-
vgi_python-0.43.
|
|
163
|
+
vgi_python-0.43.1.dist-info/METADATA,sha256=Lvh9gZvalSo1MQdnPJDwAB_R3pWuMhZFemUXAG3WtPo,25953
|
|
164
|
+
vgi_python-0.43.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
|
|
165
|
+
vgi_python-0.43.1.dist-info/entry_points.txt,sha256=3Kz1vgodw3pOL_xjtSyDB55-ZRy-U2X-X_Bdr582x0Q,165
|
|
166
|
+
vgi_python-0.43.1.dist-info/licenses/LICENSE,sha256=pbJb4zZasP6n5ifEV81wFu017TarjydaYVmGbHcehtY,6103
|
|
167
|
+
vgi_python-0.43.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|