Skip to content

Commit 06a58b6

Browse files
committed
skip over errors when migrating archive indexes
1 parent e884441 commit 06a58b6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/storage/mod.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use self::sqlite_pool::SqliteConnectionPool;
1111
use crate::error::Result;
1212
use crate::web::metrics::RenderingTimesRecorder;
1313
use crate::{db::Pool, Config, InstanceMetrics};
14-
use anyhow::{anyhow, ensure, Context as _};
14+
use anyhow::{anyhow, ensure};
1515
use chrono::{DateTime, Utc};
1616
use path_slash::PathExt;
1717
use postgres::fallible_iterator::FallibleIterator;
@@ -28,7 +28,7 @@ use std::{
2828
sync::Arc,
2929
};
3030
use tokio::runtime::Runtime;
31-
use tracing::{info, instrument, trace};
31+
use tracing::{error, info, instrument, trace};
3232

3333
const MAX_CONCURRENT_UPLOADS: usize = 1000;
3434

@@ -643,10 +643,12 @@ pub fn migrate_old_archive_indexes(
643643
let version: &str = row.get(1);
644644
info!("converting archive index for {} {}...", name, version);
645645

646-
migrate_one(storage, &rustdoc_archive_path(name, version))
647-
.context("error converting rustdoc archive index")?;
648-
migrate_one(storage, &source_archive_path(name, version))
649-
.context("error converting source archive index")?;
646+
if let Err(err) = migrate_one(storage, &rustdoc_archive_path(name, version)) {
647+
error!("error converting rustdoc archive index: {:?}", err);
648+
}
649+
if let Err(err) = migrate_one(storage, &source_archive_path(name, version)) {
650+
error!("error converting source archive index: {:?}", err);
651+
}
650652
}
651653
Ok(())
652654
}

0 commit comments

Comments
 (0)