MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / start_wavekv_sync_task

Function start_wavekv_sync_task

gateway/src/main_service.rs:678–692  ·  view source on GitHub ↗
(proxy: Proxy, wavekv_sync: Arc<WaveKvSyncService>)

Source from the content-addressed store, hash-verified

676}
677
678async 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
694fn start_wavekv_watch_task(proxy: Proxy) -> Result<()> {
695 let kv_store = proxy.kv_store.clone();

Callers 1

start_bg_tasksMethod · 0.85

Calls 1

start_sync_tasksMethod · 0.80

Tested by

no test coverage detected