Skip to content

Commit

Permalink
feat(migrate-from-gcs): add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
alextes committed Oct 13, 2023
1 parent 747f774 commit f55e64d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bin/migrate-from-gcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,16 +239,19 @@ async fn main() -> anyhow::Result<()> {

// Initialize OVH object store
let ovh = get_ovh_object_store()?;
debug!("initialized object stores");

debug!("listing day bundles");
let day_bundle_meta_stream = gcs.list(None).await?;
let mut day_bundle_metas = day_bundle_meta_stream.try_collect::<Vec<_>>().await?;
debug!("found {} day bundles", day_bundle_metas.len());

let last_file = read_last_file()?;

day_bundle_metas.retain(|file| file.location.to_string() > last_file);

if day_bundle_metas.is_empty() {
// No new files to process
info!("no new files to process");
return Ok(());
}

Expand Down

0 comments on commit f55e64d

Please sign in to comment.