logging temporary
This commit is contained in:
parent
a61d564732
commit
1a0c866b51
2 changed files with 6 additions and 3 deletions
|
@ -217,12 +217,12 @@ where
|
||||||
ActorT: Actor + GetActorType,
|
ActorT: Actor + GetActorType,
|
||||||
Activity: ActivityHandler<Error = LemmyError>,
|
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 activity = WithContext::new(activity, CONTEXT.deref().clone());
|
||||||
|
|
||||||
let form = SentActivityForm {
|
let form = SentActivityForm {
|
||||||
ap_id: activity.id().clone().into(),
|
ap_id: activity.id().clone().into(),
|
||||||
data: serde_json::to_value(activity.clone())?,
|
data: serde_json::to_value(activity)?,
|
||||||
sensitive,
|
sensitive,
|
||||||
send_inboxes: send_targets
|
send_inboxes: send_targets
|
||||||
.inboxes
|
.inboxes
|
||||||
|
@ -234,7 +234,8 @@ where
|
||||||
actor_type: actor.actor_type(),
|
actor_type: actor.actor_type(),
|
||||||
actor_apub_id: actor.id().into(),
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
@ -161,10 +161,12 @@ impl InstanceWorker {
|
||||||
{
|
{
|
||||||
id += 1;
|
id += 1;
|
||||||
processed_activities += 1;
|
processed_activities += 1;
|
||||||
|
tracing::info!("looking at activity {id}, proc={processed_activities}, latest={latest_id}");
|
||||||
let Some(ele) = get_activity_cached(pool, id)
|
let Some(ele) = get_activity_cached(pool, id)
|
||||||
.await
|
.await
|
||||||
.context("failed reading activity from db")?
|
.context("failed reading activity from db")?
|
||||||
else {
|
else {
|
||||||
|
tracing::info!("activity {id} empty, marking latest");
|
||||||
self.state.last_successful_id = id;
|
self.state.last_successful_id = id;
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue