Add random delay after returning results from the database
This commit is contained in:
parent
b9af2ae66e
commit
42bb5f0e9f
1 changed files with 7 additions and 1 deletions
|
@ -1848,7 +1848,13 @@ where
|
||||||
background.simulate_random_delay().await;
|
background.simulate_random_delay().await;
|
||||||
}
|
}
|
||||||
|
|
||||||
self.runtime.as_ref().unwrap().block_on(body)
|
let result = self.runtime.as_ref().unwrap().block_on(body);
|
||||||
|
|
||||||
|
if let Some(background) = self.background.as_ref() {
|
||||||
|
background.simulate_random_delay().await;
|
||||||
|
}
|
||||||
|
|
||||||
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue