feat: implement federation post/connections backfill schedulers

schedule_actor_posts_fetch now spawns backfill_outbox in background,
fetching all pages of a remote outbox and persisting via accept_note.
schedule_connections_fetch follows AP collection next-links, resolves
profiles, and caches them in the DB. Both were no-ops ("deferred").

Add connections_repo field to ActivityPubService; wire both factories.
This commit is contained in:
2026-05-17 11:49:53 +02:00
parent 39f7d39232
commit bb48819cad
3 changed files with 118 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
use postgres::failed_event::PgFailedEventStore;
use postgres::remote_actor_connections::PgRemoteActorConnectionRepository;
use sqlx::PgPool;
use std::sync::Arc;
@@ -56,6 +57,7 @@ pub async fn build(database_url: &str, base_url: &str, nats_url: &str) -> Worker
"thoughts".to_string(),
false,
None,
Arc::new(PgRemoteActorConnectionRepository::new(pool.clone())),
)
.await
.expect("ActivityPubService build failed"),