···
agent::atp_agent::{store::MemorySessionStore, AtpAgent},
app::bsky::actor::{get_preferences, put_preferences},
server::{create_account, get_service_auth},
sync::{get_blob, get_repo, list_blobs},
···
use atrium_xrpc_client::reqwest::ReqwestClient;
···
-
while listed_blobs.cursor.is_some() {
for cid in listed_blobs.cids.iter() {
let blob = match old_agent
···
-
listed_blobs = match old_agent
-
list_blobs::ParametersData {
-
cursor: listed_blobs.cursor.clone(),
-
did: old_agent.did().await.unwrap(),
-
Ok(response) => response,
-
println!("com.atproto.sync.listBlobs at old PDS failed due to error: {err}");
println!("Blobs successfully migrated!");
···
agent::atp_agent::{store::MemorySessionStore, AtpAgent},
app::bsky::actor::{get_preferences, put_preferences},
+
repo::list_missing_blobs,
server::{create_account, get_service_auth},
sync::{get_blob, get_repo, list_blobs},
···
use atrium_xrpc_client::reqwest::ReqwestClient;
+
io::{self, Write}, sync::Arc
···
+
for cid in listed_blobs.cids.iter() {
+
let blob = match old_agent
+
get_blob::ParametersData {
+
did: old_agent.did().await.unwrap(),
+
Ok(response) => response,
+
println!("com.atproto.sync.getBlob at current PDS failed due to error: {err}");
+
match new_agent.api.com.atproto.repo.upload_blob(blob).await {
+
println!("com.atproto.repo.uploadBlob at new PDS failed due to error: {err}");
+
let mut cursor = listed_blobs.cursor.clone();
+
while cursor.is_some() {
+
listed_blobs = match old_agent
+
list_blobs::ParametersData {
+
cursor: cursor.clone(),
+
did: old_agent.did().await.unwrap(),
+
Ok(response) => response,
+
println!("com.atproto.sync.listBlobs at old PDS failed due to error: {err}");
for cid in listed_blobs.cids.iter() {
let blob = match old_agent
···
+
cursor = listed_blobs.cursor.clone();
println!("Blobs successfully migrated!");