From 6d519ef376cf45d1231b18c2aa6cfa641e09b411 Mon Sep 17 00:00:00 2001 From: phiresky Date: Thu, 21 Sep 2023 11:07:36 +0000 Subject: [PATCH] Revert "re-remove debug comments" This reverts commit ae37ca0137b2139cc84285464c3002bf4c7ee6e0. --- crates/apub/src/activities/mod.rs | 3 ++- crates/federate/src/worker.rs | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/crates/apub/src/activities/mod.rs b/crates/apub/src/activities/mod.rs index 958065ffa..54a96014e 100644 --- a/crates/apub/src/activities/mod.rs +++ b/crates/apub/src/activities/mod.rs @@ -230,7 +230,8 @@ where actor_type: actor.actor_type(), actor_apub_id: actor.id().into(), }; - SentActivity::create(&mut data.pool(), form).await?; + let created = SentActivity::create(&mut data.pool(), form).await?; + info!("Queued for send: {:?}", created); Ok(()) } diff --git a/crates/federate/src/worker.rs b/crates/federate/src/worker.rs index b6e174c04..14c86a7d3 100644 --- a/crates/federate/src/worker.rs +++ b/crates/federate/src/worker.rs @@ -161,13 +161,21 @@ impl InstanceWorker { { id += 1; processed_activities += 1; + tracing::info!("looking at activity {id}, proc={processed_activities}, latest={latest_id}"); let Some(ele) = get_activity_cached(pool, id) .await .context("failed reading activity from db")? else { + tracing::info!("activity {id} empty, marking latest"); self.state.last_successful_id = id; continue; }; + tracing::info!( + "processing send of {} {} for {}", + ele.0.id, + ele.0.ap_id, + self.instance.domain + ); if let Err(e) = self.send_retry_loop(pool, &ele.0, &ele.1).await { tracing::warn!( "sending {} errored internally, skipping activity: {:?}", @@ -197,6 +205,13 @@ impl InstanceWorker { .get_inbox_urls(pool, activity) .await .context("failed figuring out inbox urls")?; + tracing::info!( + "inboxes of {} for {} {}: {:?}", + self.instance.domain, + activity.id, + activity.ap_id, + inbox_urls + ); if inbox_urls.is_empty() { self.state.last_successful_id = activity.id; return Ok(());