delete obsolete code

This commit is contained in:
Alek Westover
2023-06-28 17:17:03 -04:00
parent b4abbfe6fb
commit 8b586ea748
2 changed files with 7 additions and 14 deletions

View File

@@ -734,7 +734,6 @@ LIMIT 100",
// download extension control files & shared_preload_libraries
// let mut available_extensions_lock = self.available_extensions.lock().unwrap();
let available_extensions = extension_server::get_available_extensions(
ext_remote_storage,
&self.pgbin,
@@ -767,15 +766,6 @@ LIMIT 100",
match &self.ext_remote_storage {
None => anyhow::bail!("No remote extension storage"),
Some(remote_storage) => {
let compute_state = self.state.lock().unwrap().clone();
let pspec = compute_state.pspec.as_ref().expect("spec must be set");
let private_ext_prefixes = match &pspec.spec.private_extensions {
Some(private_extensions) => private_extensions.clone(),
None => Vec::new(),
};
info!("private_ext_prefixes: {:?}", &private_ext_prefixes);
extension_server::download_extension_sql_files(
&filename,
remote_storage,

View File

@@ -64,7 +64,6 @@ async fn download_helper(
download_location.join(p)
}
None => download_location.join(remote_from_path.object_name().expect("bad object")),
};
@@ -86,7 +85,7 @@ async fn download_helper(
if remote_from_prefix.is_some() {
if let Some(prefix) = local_path.parent() {
info!(
"Downloading file with prefix. create directory {:?}",
"Downloading file with prefix. Create directory {:?}",
prefix
);
std::fs::create_dir_all(prefix)?;
@@ -162,11 +161,15 @@ pub async fn get_available_libraries(
let mut paths: Vec<RemotePath> = Vec::new();
// public libraries
paths.push(RemotePath::new(&Path::new(&pg_version).join("lib/")).unwrap());
paths.push(
RemotePath::new(&Path::new(&pg_version).join("lib/"))
.expect("The hard coded path here is valid"),
);
// private libraries
for private_prefix in private_ext_prefixes {
paths.push(
RemotePath::new(&Path::new(&pg_version).join(private_prefix).join("lib")).unwrap(),
RemotePath::new(&Path::new(&pg_version).join(private_prefix).join("lib"))
.expect("The hard coded path here is valid"),
);
}