add configurable RRDP snapshot and delta timeouts
This commit is contained in:
@@ -112,13 +112,19 @@ pub(crate) fn run_config(args: RunConfig) -> Result<(), String> {
|
||||
let validation_started = std::time::Instant::now();
|
||||
crate::logging::observer::phase("runtime_setup");
|
||||
let collect_current_repo_objects = false;
|
||||
let mut http_config = HttpFetcherConfig {
|
||||
timeout: std::time::Duration::from_secs(args.http_timeout_secs.max(1)),
|
||||
extra_root_certificates_pem: http_root_certificates_pem.clone(),
|
||||
..HttpFetcherConfig::default()
|
||||
};
|
||||
if let Some(timeout) = args.rrdp_snapshot_timeout_secs {
|
||||
http_config.rrdp_snapshot_timeout = std::time::Duration::from_secs(timeout.max(1));
|
||||
}
|
||||
if let Some(timeout) = args.rrdp_delta_timeout_secs {
|
||||
http_config.rrdp_delta_timeout = std::time::Duration::from_secs(timeout.max(1));
|
||||
}
|
||||
let out = if let Some(dir) = args.rsync_local_dir.as_ref() {
|
||||
let http = BlockingHttpFetcher::new(HttpFetcherConfig {
|
||||
timeout: std::time::Duration::from_secs(args.http_timeout_secs.max(1)),
|
||||
extra_root_certificates_pem: http_root_certificates_pem.clone(),
|
||||
..HttpFetcherConfig::default()
|
||||
})
|
||||
.map_err(|e| e.to_string())?;
|
||||
let http = BlockingHttpFetcher::new(http_config.clone()).map_err(|e| e.to_string())?;
|
||||
let rsync = LocalDirRsyncFetcher::new(dir);
|
||||
run_online_validation_with_fetchers(
|
||||
Arc::clone(&store),
|
||||
@@ -132,12 +138,7 @@ pub(crate) fn run_config(args: RunConfig) -> Result<(), String> {
|
||||
timing.as_ref().map(|(_, t)| t),
|
||||
)?
|
||||
} else {
|
||||
let http = BlockingHttpFetcher::new(HttpFetcherConfig {
|
||||
timeout: std::time::Duration::from_secs(args.http_timeout_secs.max(1)),
|
||||
extra_root_certificates_pem: http_root_certificates_pem.clone(),
|
||||
..HttpFetcherConfig::default()
|
||||
})
|
||||
.map_err(|e| e.to_string())?;
|
||||
let http = BlockingHttpFetcher::new(http_config).map_err(|e| e.to_string())?;
|
||||
let rsync = SystemRsyncFetcher::new(SystemRsyncConfig {
|
||||
rsync_bin: args
|
||||
.rsync_command
|
||||
|
||||
Reference in New Issue
Block a user