(proxy: Proxy, wavekv_sync: Arc<WaveKvSyncService>)
| 676 | } |
| 677 | |
| 678 | async fn start_wavekv_sync_task(proxy: Proxy, wavekv_sync: Arc<WaveKvSyncService>) { |
| 679 | if !proxy.config.sync.enabled { |
| 680 | info!("WaveKV sync is disabled"); |
| 681 | return; |
| 682 | } |
| 683 | |
| 684 | // Bootstrap already done in ProxyInner::new() before certbot init |
| 685 | // Peers are discovered from bootnode or via Admin.SetNodeInfo RPC |
| 686 | |
| 687 | // Start periodic sync tasks (runs forever in background) |
| 688 | tokio::spawn(async move { |
| 689 | wavekv_sync.start_sync_tasks().await; |
| 690 | }); |
| 691 | info!("WaveKV sync tasks started"); |
| 692 | } |
| 693 | |
| 694 | fn start_wavekv_watch_task(proxy: Proxy) -> Result<()> { |
| 695 | let kv_store = proxy.kv_store.clone(); |
no test coverage detected