feat: Call user events endpoint when indexing 3rd party HSs#726
Draft
feat: Call user events endpoint when indexing 3rd party HSs#726
Conversation
…HS from run_all - NexusWatcher::start now spawns 3 parallel tokio tasks: 1. Default homeserver processing (run_default_homeserver) 2. Other homeservers processing (run_all, excluding default HS) 3. Reserved for future use (TODO placeholder) - Added run_default_homeserver to TEventProcessorRunner trait - Modified homeservers_by_priority to exclude the default homeserver - Added Send + Sync bounds to TEventProcessorRunner trait - Updated all tests and rustdocs Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
…match Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
Fix pkarr version mismatch in PubkyId conversion
1 task
…s` (#761) * refactor: extract periodic task loop into reusable run_periodic_tasks * Fix periodic task ticks to skip missed intervals Set MissedTickBehavior::Skip on the interval timer in run_periodic_tasks so that if a task takes longer than its tick interval, missed ticks are dropped instead of queuing up a burst of back-to-back invocations. Added tests verifying that slow tasks don't accumulate queued ticks and that fast tasks still tick at the expected cadence. * chore: rename variables for clarity * chore: make task_runner module private * log: NexusWatcher::start logs task outcomes on exit * chore: cargo fmt * chore: limit visibility of Task structs to pub(crate) * fix: correctly set task name for panicking tasks * fix: ensure NexusWatcher::start returns Err if any task panics --------- Co-authored-by: Claude <noreply@anthropic.com>
c6513d7 to
5ad570a
Compare
c905186 to
49af0a0
Compare
* ref: runners and indexers * chore: use runner pub function * extract_retry_event_info -> handle_error (#785) * remove get_homeserver_id fn (#784) * Extract common TEventProcessorRunner::run (#789) * Add HsEventProcessor rustdoc * Add KeyBasedEventProcessor rustdoc * Add HsEventProcessorRunner rustdoc * Add KeyBasedEventProcessorRunner rustdoc * Add TODO for KeyBasedEventProcessor::run_internal * Extract no-op default TEventProcessorRunner::post_run fn --------- Co-authored-by: aintnostressin <aintnostressin@proton.me> Co-authored-by: ok300 <106775972+ok300@users.noreply.github.com>
* ref: runners and indexers * chore: use runner pub function * extract_retry_event_info -> handle_error (#785) * remove get_homeserver_id fn (#784) * TEventProcessor: expand logic of handle_error * Clarify comments * fix: remove InternalError from is_infrastructure * Expand logic for EventProcessorError::is_infrastructure_err * chore: remove unused imports --------- Co-authored-by: tipogi <tipogi@protonmail.com> Co-authored-by: aintnostressin <aintnostressin@proton.me>
6d6fae4 to
ec43bd7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates HS indexing logic to rely on the new user events endpoint on the HS.
This PR acts as an "umbrella PR" for this DX feature. It is meant to contain all relevant changes and sub-PRs. It will remain a draft until the full feature is ready for final review.
Steps:
pubkyto relevant feature branch (done in 6a06e9c)EventStreamBuilder.event_stream_for()andEventStreamBuilder.add_users()pubky-core#311pubkytov0.7.x(done in c6513d7)NexusWatcher::startto start 3 threads, each with owntick: index default HS, index other HSs, resolve user-to-HS mappingsuser-hs-resolvertask #765