Skip to content

Commit

Permalink
Fix downloading
Browse files Browse the repository at this point in the history
  • Loading branch information
maplant committed May 14, 2024
1 parent 1367c27 commit 9cc4cc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mobile_verifier/src/boosting_oracles/data_sets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ where
}

pub async fn run(mut self) -> anyhow::Result<()> {
let poll_duration = Duration::minutes(5);
let poll_duration = Duration::minutes(1);

self.data_sets
.urbanization
Expand Down Expand Up @@ -369,7 +369,7 @@ fn get_data_set_path(
let path = PathBuf::from(format!(
"{}.{}.res10.h3tree",
data_set_type.to_prefix(),
time_to_use.timestamp()
time_to_use.timestamp_millis()
));
let mut dir = data_set_directory.to_path_buf();
dir.push(path);
Expand All @@ -396,8 +396,10 @@ async fn delete_old_data_sets(
let prefix = &cap[1];
let timestamp = cap[2].parse::<u64>()?.to_timestamp_millis()?;
if prefix == data_set_type.to_prefix() && timestamp < time_to_use {
let mut path = data_set_directory.to_path_buf();
path.push(data_set.path());
tracing::info!(data_set = &*file_name, "Deleting old data set file");
tokio::fs::remove_file(data_set.file_name()).await?;
tokio::fs::remove_file(path).await?;
}
}
Ok(())
Expand Down

0 comments on commit 9cc4cc6

Please sign in to comment.