File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -103,16 +103,13 @@ fn main() -> Result<(), std::io::Error> {
103
103
// Determine number of threads to use for tokenization based on number of cores
104
104
let num_cpus = num_cpus:: get ( ) ;
105
105
let num_shards = sharded_client. shard_count ( ) ;
106
- num_cpus. checked_sub ( num_shards) . unwrap_or ( 1 ) . min ( 8 )
106
+ num_cpus. checked_sub ( num_shards) . unwrap_or ( 1 ) . clamp ( 1 , 8 )
107
107
} ) ;
108
108
109
109
tracing:: info!( "Using pool of {tokenization_workers} threads for tokenization" ) ;
110
110
111
- // Clear the cache; useful if the webserver rebooted
112
- sharded_client
113
- . clear_cache ( )
114
- . await
115
- . expect ( "Unable to clear cache" ) ;
111
+ // Clear the cache; useful if this process rebooted
112
+ sharded_client. clear_cache ( ) . await . expect ( "Unable to clear cache" ) ;
116
113
tracing:: info!( "Connected" ) ;
117
114
118
115
let grpc_addr = SocketAddr :: new (
You can’t perform that action at this time.
0 commit comments