Skip to content

Commit abddb41

Browse files
committed
new: add deadline info to the first hw
1 parent af71be0 commit abddb41

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

qdrant_client/async_qdrant_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,16 @@ async def cluster_collection_update(
22942294
timeout: Optional[int] = None,
22952295
**kwargs: Any,
22962296
) -> bool:
2297+
"""Updates the cluster configuration for a specified collection.
2298+
2299+
Args:
2300+
collection_name: Name of the collection
2301+
cluster_operation: Cluster operation to update
2302+
timeout: Timeout in seconds to wait for the operation to complete
2303+
2304+
Returns:
2305+
bool: Operation result
2306+
"""
22972307
assert len(kwargs) == 0, f"Unknown arguments: {list(kwargs.keys())}"
22982308
return await self._client.cluster_collection_update(
22992309
collection_name=collection_name,
@@ -2303,12 +2313,29 @@ async def cluster_collection_update(
23032313
)
23042314

23052315
async def collection_cluster_info(self, collection_name: str) -> types.CollectionClusterInfo:
2316+
"""Retrieves cluster details for a specified collection.
2317+
2318+
Args:
2319+
collection_name: Name of the collection
2320+
2321+
Returns:
2322+
types.CollectionClusterInfo: cluster details
2323+
"""
23062324
return await self._client.collection_cluster_info(collection_name=collection_name)
23072325

23082326
async def cluster_status(self) -> types.ClusterStatus:
2327+
"""Returns information about the cluster's current state and composition.
2328+
2329+
Returns: types.CollectionClusterInfo
2330+
"""
23092331
return await self._client.cluster_status()
23102332

23112333
async def recover_current_peer(self) -> bool:
2334+
"""Attempts to restore or synchronize the node's current state with that of its peers.
2335+
2336+
Returns:
2337+
bool: Operation result
2338+
"""
23122339
return await self._client.recover_current_peer()
23132340

23142341
async def remove_peer(
@@ -2318,4 +2345,15 @@ async def remove_peer(
23182345
timeout: Optional[int] = None,
23192346
**kwargs: Any,
23202347
) -> bool:
2348+
"""Attempts to remove the node from the cluster. This endpoint returns an error if the node (peer) has
2349+
shards on it.
2350+
2351+
Args:
2352+
peer_id: Peer ID
2353+
force: If true - removes peer even if it has shards/replicas on it.
2354+
timeout: Wait for operation commit timeout in seconds. If timeout is reached - request will fail
2355+
2356+
Returns:
2357+
bool: Operation result
2358+
"""
23212359
return await self._client.remove_peer(peer_id, force=force, timeout=timeout, **kwargs)

qdrant_client/qdrant_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,16 @@ def cluster_collection_update(
24232423
timeout: Optional[int] = None,
24242424
**kwargs: Any,
24252425
) -> bool:
2426+
"""Updates the cluster configuration for a specified collection.
2427+
2428+
Args:
2429+
collection_name: Name of the collection
2430+
cluster_operation: Cluster operation to update
2431+
timeout: Timeout in seconds to wait for the operation to complete
2432+
2433+
Returns:
2434+
bool: Operation result
2435+
"""
24262436
assert len(kwargs) == 0, f"Unknown arguments: {list(kwargs.keys())}"
24272437

24282438
return self._client.cluster_collection_update(
@@ -2433,12 +2443,29 @@ def cluster_collection_update(
24332443
)
24342444

24352445
def collection_cluster_info(self, collection_name: str) -> types.CollectionClusterInfo:
2446+
"""Retrieves cluster details for a specified collection.
2447+
2448+
Args:
2449+
collection_name: Name of the collection
2450+
2451+
Returns:
2452+
types.CollectionClusterInfo: cluster details
2453+
"""
24362454
return self._client.collection_cluster_info(collection_name=collection_name)
24372455

24382456
def cluster_status(self) -> types.ClusterStatus:
2457+
"""Returns information about the cluster's current state and composition.
2458+
2459+
Returns: types.CollectionClusterInfo
2460+
"""
24392461
return self._client.cluster_status()
24402462

24412463
def recover_current_peer(self) -> bool:
2464+
"""Attempts to restore or synchronize the node's current state with that of its peers.
2465+
2466+
Returns:
2467+
bool: Operation result
2468+
"""
24422469
return self._client.recover_current_peer()
24432470

24442471
def remove_peer(
@@ -2448,4 +2475,15 @@ def remove_peer(
24482475
timeout: Optional[int] = None,
24492476
**kwargs: Any,
24502477
) -> bool:
2478+
"""Attempts to remove the node from the cluster. This endpoint returns an error if the node (peer) has
2479+
shards on it.
2480+
2481+
Args:
2482+
peer_id: Peer ID
2483+
force: If true - removes peer even if it has shards/replicas on it.
2484+
timeout: Wait for operation commit timeout in seconds. If timeout is reached - request will fail
2485+
2486+
Returns:
2487+
bool: Operation result
2488+
"""
24512489
return self._client.remove_peer(peer_id, force=force, timeout=timeout, **kwargs)

0 commit comments

Comments
 (0)