diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 14:01:47 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-01-07 14:01:47 +0000 |
| commit | 74979c1de32f69a39e0e290f56435ef687c2b6f6 (patch) | |
| tree | 26f235d1de053a5d1b44c4c7d642c2ad65fd0fd1 /src/purgatory/sync/mod.rs | |
| parent | 871ab773cd1d2fea89fdfe584d637c64694f9991 (diff) | |
Add RealSyncContext implementation for production purgatory sync
Implement the production SyncContext that connects to real systems:
- RealSyncContext struct holding purgatory, database, git_data_path,
our_domain, and local_relay references
- fetch_repository_data: delegates to git::authorization module
- collect_needed_oids: collects commit hashes from state events
(branches/tags) and PR events (c-tag) in purgatory
- oid_exists: delegates to git::oid_exists function
- fetch_oids: uses git fetch --depth=1 to retrieve specific OIDs
from remote servers, running in spawn_blocking for async safety
- process_newly_available_git_data: delegates to the unified function
in git::sync module for consistent post-git-data processing
- has_pending_events: delegates to purgatory method
- find_target_repo: finds first existing owner repository on disk
- our_domain: returns configured domain for clone URL filtering
This enables the purgatory sync loop to use real database queries,
git operations, and event processing instead of mocks.
Diffstat (limited to 'src/purgatory/sync/mod.rs')
| -rw-r--r-- | src/purgatory/sync/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/purgatory/sync/mod.rs b/src/purgatory/sync/mod.rs index be89130..022a556 100644 --- a/src/purgatory/sync/mod.rs +++ b/src/purgatory/sync/mod.rs | |||
| @@ -13,7 +13,7 @@ mod r#loop; | |||
| 13 | mod queue; | 13 | mod queue; |
| 14 | mod throttle; | 14 | mod throttle; |
| 15 | 15 | ||
| 16 | pub use context::{ProcessResult, SyncContext}; | 16 | pub use context::{ProcessResult, RealSyncContext, SyncContext}; |
| 17 | pub use functions::{ | 17 | pub use functions::{ |
| 18 | get_throttled_domains_with_untried_urls, sync_identifier, sync_identifier_from_url, | 18 | get_throttled_domains_with_untried_urls, sync_identifier, sync_identifier_from_url, |
| 19 | sync_identifier_next_url, ThrottledDomainInfo, | 19 | sync_identifier_next_url, ThrottledDomainInfo, |