Spaces:
Running
Running
Zacherina
commited on
:bug: fix(search): Resolve random delay condition during search for `individual/non-production` self-hosted server (#617)
Browse files
src/server/routes/search.rs
CHANGED
@@ -85,7 +85,7 @@ pub async fn search(
|
|
85 |
let next_page = page + 1;
|
86 |
|
87 |
// Add a random delay before making the request.
|
88 |
-
if config.aggregator.random_delay ||
|
89 |
let nanos = SystemTime::now().duration_since(UNIX_EPOCH)?.subsec_nanos() as f32;
|
90 |
let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1;
|
91 |
tokio::time::sleep(Duration::from_secs(delay)).await;
|
|
|
85 |
let next_page = page + 1;
|
86 |
|
87 |
// Add a random delay before making the request.
|
88 |
+
if config.aggregator.random_delay || config.debug {
|
89 |
let nanos = SystemTime::now().duration_since(UNIX_EPOCH)?.subsec_nanos() as f32;
|
90 |
let delay = ((nanos / 1_0000_0000 as f32).floor() as u64) + 1;
|
91 |
tokio::time::sleep(Duration::from_secs(delay)).await;
|