Skip to content

Commit 1d92e04

Browse files
init sync for ingest server
1 parent 70ca26d commit 1d92e04

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/handlers/http/modal/ingest_server.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use tokio::sync::oneshot;
3131
use tokio::sync::OnceCell;
3232

3333
use crate::handlers::http::modal::NodeType;
34+
use crate::sync::sync_start;
3435
use crate::{
3536
analytics,
3637
handlers::{
@@ -114,6 +115,13 @@ impl ParseableServer for IngestServer {
114115

115116
migration::run_migration(&PARSEABLE).await?;
116117

118+
// local sync on init
119+
tokio::spawn(async {
120+
if let Err(e) = sync_start().await {
121+
tracing::warn!("local sync on server start failed: {e}");
122+
}
123+
});
124+
117125
// Run sync on a background thread
118126
let (cancel_tx, cancel_rx) = oneshot::channel();
119127
thread::spawn(|| sync::handler(cancel_rx));

0 commit comments

Comments
 (0)