mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-18 12:48:07 +00:00
sync new inputs found by supervisor tasks (#484)
This commit is contained in:
@ -16,7 +16,7 @@ use onefuzz::{
|
|||||||
jitter::delay_with_jitter,
|
jitter::delay_with_jitter,
|
||||||
process::monitor_process,
|
process::monitor_process,
|
||||||
syncdir::{SyncOperation::Pull, SyncedDir},
|
syncdir::{SyncOperation::Pull, SyncedDir},
|
||||||
telemetry::Event::new_result,
|
telemetry::Event::{new_coverage, new_result},
|
||||||
};
|
};
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
use std::{
|
use std::{
|
||||||
@ -95,6 +95,7 @@ pub async fn spawn(config: SupervisorConfig) -> Result<(), Error> {
|
|||||||
path: runtime_dir.path().join("inputs"),
|
path: runtime_dir.path().join("inputs"),
|
||||||
url: config.inputs.url.clone(),
|
url: config.inputs.url.clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs.init().await?;
|
inputs.init().await?;
|
||||||
if let Some(context) = &config.wait_for_files {
|
if let Some(context) = &config.wait_for_files {
|
||||||
let dir = match context {
|
let dir = match context {
|
||||||
@ -110,7 +111,7 @@ pub async fn spawn(config: SupervisorConfig) -> Result<(), Error> {
|
|||||||
delay_with_jitter(delay).await;
|
delay_with_jitter(delay).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let monitor_inputs = inputs.monitor_results(new_coverage);
|
||||||
let continuous_sync_task = inputs.continuous_sync(Pull, config.ensemble_sync_delay);
|
let continuous_sync_task = inputs.continuous_sync(Pull, config.ensemble_sync_delay);
|
||||||
|
|
||||||
let process = start_supervisor(
|
let process = start_supervisor(
|
||||||
@ -147,6 +148,7 @@ pub async fn spawn(config: SupervisorConfig) -> Result<(), Error> {
|
|||||||
monitor_supervisor,
|
monitor_supervisor,
|
||||||
monitor_stats,
|
monitor_stats,
|
||||||
monitor_crashes,
|
monitor_crashes,
|
||||||
|
monitor_inputs,
|
||||||
continuous_sync_task,
|
continuous_sync_task,
|
||||||
monitor_reports_future,
|
monitor_reports_future,
|
||||||
)?;
|
)?;
|
||||||
|
Reference in New Issue
Block a user