From 7b1b36b8c7e448d1d170c8c6e1f88bb766163fbb Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 26 May 2026 20:38:49 +0530 Subject: Fix push_target remote reuse and non-fatal per-repo errors - git_mirror: reuse existing push_target remote via remote_set_url instead of failing on 'remote already exists' on subsequent cycles - mirror_cycle: catch per-repo errors instead of propagating with ? so one failed clone doesn't abort the remaining 87 repos - Add PLAN.md with bug tracking checklist --- src/main.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 494342c..3fcd27b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -190,13 +190,21 @@ async fn mirror_cycle( "mirroring to missing servers" ); - mirror.mirror_repo_to_servers(db, repo, &missing).await?; - nostr_mirror.forward_repo_events(db, repo, servers).await?; + if let Err(e) = mirror.mirror_repo_to_servers(db, repo, &missing).await { + tracing::error!(identifier = %repo.identifier, error = %e, "git mirror failed for repo, continuing"); + } + + if let Err(e) = nostr_mirror.forward_repo_events(db, repo, servers).await { + tracing::error!(identifier = %repo.identifier, error = %e, "nostr mirror failed for repo, continuing"); + } } - nostr_mirror + if let Err(e) = nostr_mirror .sync_all_events(db, &config.npubs, servers) - .await?; + .await + { + tracing::error!(error = %e, "event sync failed"); + } tracing::info!("mirror cycle complete"); Ok(()) -- cgit v1.2.3