···
agent::atp_agent::{store::MemorySessionStore, AtpAgent},
app::bsky::actor::{get_preferences, put_preferences},
5
+
repo::list_missing_blobs,
server::{create_account, get_service_auth},
sync::{get_blob, get_repo, list_blobs},
···
use atrium_xrpc_client::reqwest::ReqwestClient;
13
+
io::{self, Write}, sync::Arc
···
249
-
while listed_blobs.cursor.is_some() {
249
+
for cid in listed_blobs.cids.iter() {
250
+
let blob = match old_agent
256
+
get_blob::ParametersData {
257
+
cid: cid.to_owned(),
258
+
did: old_agent.did().await.unwrap(),
264
+
Ok(response) => response,
266
+
println!("com.atproto.sync.getBlob at current PDS failed due to error: {err}");
271
+
match new_agent.api.com.atproto.repo.upload_blob(blob).await {
274
+
println!("com.atproto.repo.uploadBlob at new PDS failed due to error: {err}");
280
+
let mut cursor = listed_blobs.cursor.clone();
281
+
while cursor.is_some() {
282
+
listed_blobs = match old_agent
288
+
list_blobs::ParametersData {
289
+
cursor: cursor.clone(),
290
+
did: old_agent.did().await.unwrap(),
298
+
Ok(response) => response,
300
+
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
···
281
-
listed_blobs = match old_agent
287
-
list_blobs::ParametersData {
288
-
cursor: listed_blobs.cursor.clone(),
289
-
did: old_agent.did().await.unwrap(),
297
-
Ok(response) => response,
299
-
println!("com.atproto.sync.listBlobs at old PDS failed due to error: {err}");
335
+
cursor = listed_blobs.cursor.clone();
println!("Blobs successfully migrated!");