more debugging, didn't find the problem

This commit is contained in:
Alek Westover
2023-06-20 22:48:43 -04:00
parent 356f7d3a7e
commit e7b9259675
2 changed files with 12 additions and 4 deletions

View File

@@ -91,10 +91,18 @@ pub async fn download_extension(
let remote_storage = GenericRemoteStorage::from_config(config)?;
std::fs::write("alek/proof", "proof")?;
if let GenericRemoteStorage::AwsS3(my_bucket) = remote_storage.clone() {
let storage_details = format!(
"{:?}, {:?}",
my_bucket.bucket_name, my_bucket.prefix_in_bucket
);
std::fs::write("alek/storagedetails", storage_details)?;
}
// // this is just for testing doing a testing thing
// let folder = RemotePath::new(Path::new("public_extensions"))?;
// let from_paths = remote_storage.list_files(Some(&folder)).await?;
let folder = RemotePath::new(Path::new("public_extensions"))?;
let from_paths = remote_storage.list_files(Some(&folder)).await?;
std::fs::write("alek/antiproof", "antiproof")?;
// let some_path = from_paths[0]
// .object_name()
// .expect("had a problem with somepath in extension server");

View File

@@ -116,8 +116,8 @@ pub(super) mod metrics {
/// AWS S3 storage.
pub struct S3Bucket {
client: Client,
bucket_name: String,
prefix_in_bucket: Option<String>,
pub bucket_name: String, // TODO: undo making these public
pub prefix_in_bucket: Option<String>,
max_keys_per_list_response: Option<i32>,
// Every request to S3 can be throttled or cancelled, if a certain number of requests per second is exceeded.
// Same goes to IAM, which is queried before every S3 request, if enabled. IAM has even lower RPS threshold.