Skip to content

Commit

Permalink
garbage collect in the background
Browse files Browse the repository at this point in the history
this shouldn't prevent users from connecting
  • Loading branch information
billyb2 committed Jun 23, 2024
1 parent 94ab58d commit 266e3ab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ async fn main() -> Result<()> {
#[cfg(not(feature = "prod"))]
let chunk_db = Arc::new(FSChunkDB::new().unwrap());

chunk_db.garbage_collect(meta_db.clone()).await?;
let chunk_db_clone = Arc::clone(&chunk_db);
let meta_db_clone = Arc::clone(&meta_db);

tokio::task::spawn(async move { chunk_db_clone.garbage_collect(meta_db_clone).await });

let internal_tcp_addr = "[::]:9990".to_socket_addrs().unwrap().next().unwrap();

Expand Down

0 comments on commit 266e3ab

Please sign in to comment.