mirror of
https://github.com/NLnetLabs/routinator.git
synced 2024-05-19 06:50:04 +00:00
Ignore unavailable rsync targets.
This commit is contained in:
@ -70,6 +70,7 @@ impl Repository {
|
||||
}
|
||||
|
||||
fn update(&self) -> Result<bool, ProcessingError> {
|
||||
debug!("UPDATED NOT IMPLEMENTED YET.");
|
||||
Ok(false)
|
||||
}
|
||||
|
||||
@ -310,8 +311,13 @@ impl Repository {
|
||||
Ok(Some(data.into()))
|
||||
}
|
||||
Err(ref err) if err.kind() == io::ErrorKind::NotFound && create => {
|
||||
self.populate_uri_dir(uri)?;
|
||||
self.load_file(uri, false)
|
||||
if let Err(_) = self.populate_uri_dir(uri) {
|
||||
debug!("rsync failed. Skipping ...");
|
||||
Ok(None)
|
||||
}
|
||||
else {
|
||||
self.load_file(uri, false)
|
||||
}
|
||||
}
|
||||
Err(err) => Err(err.into())
|
||||
}
|
||||
|
@ -18,6 +18,7 @@ pub fn update<P: AsRef<Path>>(
|
||||
let status = Command::new("rsync")
|
||||
.arg("-az")
|
||||
.arg("--delete")
|
||||
.arg("--contimeout=10")
|
||||
.arg(source.as_str())
|
||||
.arg(destination.as_ref())
|
||||
.status()?;
|
||||
|
Reference in New Issue
Block a user