logging temporary

This commit is contained in:
phiresky 2023-09-20 13:37:18 +00:00
parent a61d564732
commit 1a0c866b51
2 changed files with 6 additions and 3 deletions

View file

@ -217,12 +217,12 @@ where
ActorT: Actor + GetActorType,
Activity: ActivityHandler<Error = LemmyError>,
{
info!("Sending activity {}", activity.id().to_string());
info!("Saving outgoing activity to queue {}", activity.id());
let activity = WithContext::new(activity, CONTEXT.deref().clone());
let form = SentActivityForm {
ap_id: activity.id().clone().into(),
data: serde_json::to_value(activity.clone())?,
data: serde_json::to_value(activity)?,
sensitive,
send_inboxes: send_targets
.inboxes
@ -234,7 +234,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(())
}

View file

@ -161,10 +161,12 @@ 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;
};