File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ class ServerConfig(BaseSettings):
219219 ] = None
220220
221221 mongo_count_timeout : Annotated [
222- int ,
222+ float ,
223223 Field (
224224 description = (
225225 "Number of seconds to allow MongoDB to perform a full database count "
@@ -229,7 +229,7 @@ class ServerConfig(BaseSettings):
229229 "response times."
230230 ),
231231 ),
232- ] = 5
232+ ] = 0. 5
233233
234234 mongo_database : Annotated [
235235 str ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def count(self, **kwargs: Any) -> int | None:
8585 return self .collection .estimated_document_count ()
8686 else :
8787 if "maxTimeMS" not in kwargs :
88- kwargs ["maxTimeMS" ] = 1000 * CONFIG .mongo_count_timeout
88+ kwargs ["maxTimeMS" ] = int ( 1000 * CONFIG .mongo_count_timeout )
8989 try :
9090 return self .collection .count_documents (** kwargs )
9191 except ExecutionTimeout :
You can’t perform that action at this time.
0 commit comments