From 83ded03dd7540c56604e8361172595c160cb3d22 Mon Sep 17 00:00:00 2001 From: Arnaud Gourlay Date: Thu, 8 Aug 2024 15:53:03 +0200 Subject: [PATCH] GetPoints timeout --- src/grpc_macros.rs | 2 +- src/qdrant.rs | 1 + tests/protos.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/grpc_macros.rs b/src/grpc_macros.rs index 95a98385..ab8bb9fe 100644 --- a/src/grpc_macros.rs +++ b/src/grpc_macros.rs @@ -18,7 +18,7 @@ macro_rules! builder_type_conversions { ($main_type:ident,$builder_type:ident,$build_fn:ident) => { impl From<$builder_type> for $main_type { fn from(value: $builder_type) -> Self { - value.$build_fn().unwrap() + value.$build_fn().expect(&format!("Failed to convert {} to {}", stringify!($builder_type), stringify!($main_type))) } } diff --git a/src/qdrant.rs b/src/qdrant.rs index 234c239f..f3c4aeff 100644 --- a/src/qdrant.rs +++ b/src/qdrant.rs @@ -3368,6 +3368,7 @@ pub struct GetPoints { pub shard_key_selector: ::core::option::Option, /// If set, overrides global timeout setting for this request. Unit is seconds. #[prost(uint64, optional, tag = "8")] + #[builder(default, setter(strip_option), field(vis = "pub(crate)"))] pub timeout: ::core::option::Option, } #[derive(derive_builder::Builder)] diff --git a/tests/protos.rs b/tests/protos.rs index 194d30aa..2683a9fa 100644 --- a/tests/protos.rs +++ b/tests/protos.rs @@ -352,6 +352,7 @@ fn configure_builder(builder: Builder) -> Builder { builder_custom_into!(read_consistency::Value, self.read_consistency), ), ("GetPoints.shard_key_selector", DEFAULT_OPTION_INTO), + ("GetPoints.timeout", DEFAULT_OPTION), // SearchBatchPoints ("SearchBatchPoints.collection_name", PUBLIC_ONLY), ("SearchBatchPoints.search_points", PUBLIC_ONLY),