fix: make write load_generators wait (#24872)

pull/24876/head
Paul Dix 2024-04-02 17:08:44 -04:00 committed by GitHub
parent cc55685886
commit 1b3d279d70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -163,6 +163,11 @@ async fn run_generator(
start_time: Option<DateTime<Local>>,
end_time: Option<DateTime<Local>>,
) {
// if not generator 1, pause for 100ms to let it start the run to create the schema
if generator.writer_id != 1 {
tokio::time::sleep(Duration::from_millis(100)).await;
}
let mut sample_buffer = vec![];
// if the start time is set, load the historical samples as quickly as possible