diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-18 19:28:28 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-18 19:28:28 +0000 |
| commit | 3d9359d5ac0045fb93fd8732160e0de8413d6881 (patch) | |
| tree | 625836b625f285271de940d7ab28ab254b821f8a /src/main.rs | |
| parent | 07c8c00274298e90654207d8baceb1089514ccae (diff) | |
Revert "feat: upgrade repo to Full sync and trigger PR event subscription after announcement promotion"
This reverts commit d76003b629a4a03dba23a8a1c41da6e4ac4c30cf.
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/main.rs b/src/main.rs index 3ff30fb..ab6ede7 100644 --- a/src/main.rs +++ b/src/main.rs | |||
| @@ -132,24 +132,6 @@ async fn main() -> Result<()> { | |||
| 132 | // Get a reference to the rejected events index for shutdown persistence | 132 | // Get a reference to the rejected events index for shutdown persistence |
| 133 | let shutdown_rejected_index = sync_manager.rejected_events_index(); | 133 | let shutdown_rejected_index = sync_manager.rejected_events_index(); |
| 134 | 134 | ||
| 135 | // Get a reference to the repo sync index for upgrading sync levels on promotion | ||
| 136 | let repo_sync_index = sync_manager.repo_sync_index(); | ||
| 137 | |||
| 138 | // Set the repo sync index on the write policy so user-submitted purgatory | ||
| 139 | // announcements can trigger relay discovery (connect to relays in announcement tags) | ||
| 140 | relay_with_db | ||
| 141 | .write_policy | ||
| 142 | .set_repo_sync_index(repo_sync_index.clone()); | ||
| 143 | |||
| 144 | // Get the action sender BEFORE consuming sync_manager with spawn | ||
| 145 | let action_tx = sync_manager.action_tx(); | ||
| 146 | |||
| 147 | // Set the sync action sender so the write policy can trigger relay connections | ||
| 148 | // when user-submitted purgatory announcements are registered with StateOnly level | ||
| 149 | if let Some(tx) = action_tx.clone() { | ||
| 150 | relay_with_db.write_policy.set_sync_action_tx(tx); | ||
| 151 | } | ||
| 152 | |||
| 153 | tokio::spawn(async move { | 135 | tokio::spawn(async move { |
| 154 | sync_manager.run().await; | 136 | sync_manager.run().await; |
| 155 | }); | 137 | }); |
| @@ -202,8 +184,6 @@ async fn main() -> Result<()> { | |||
| 202 | Some(config.domain.clone()), | 184 | Some(config.domain.clone()), |
| 203 | Some(relay_with_db.relay.clone()), | 185 | Some(relay_with_db.relay.clone()), |
| 204 | git_naughty_list.clone(), | 186 | git_naughty_list.clone(), |
| 205 | Some(repo_sync_index), | ||
| 206 | action_tx, | ||
| 207 | )); | 187 | )); |
| 208 | 188 | ||
| 209 | // Create throttle manager for rate limiting remote git servers | 189 | // Create throttle manager for rate limiting remote git servers |