A decentralized music tracking and discovery platform built on AT Protocol 🎵
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: increase sleep duration to 1200ms to prevent overwhelming the database during scrobble insertion

+2 -5
+1 -4
crates/feed/src/repo/duckdb/mod.rs
··· 27 27 impl DuckdbRepo { 28 28 pub async fn new() -> Result<Self, Error> { 29 29 let manager = DuckDBConnectionManager::file(DB_PATH); 30 - let pool = r2d2::Pool::builder() 31 - .idle_timeout(Some(std::time::Duration::from_secs(60))) 32 - .max_size(15) 33 - .build(manager)?; 30 + let pool = r2d2::Pool::builder().build(manager)?; 34 31 Ok(Self { pool }) 35 32 } 36 33 }
+1 -1
crates/feed/src/sync.rs
··· 140 140 repo.insert_scrobble(&did, &scrobble_uri, record).await?; 141 141 142 142 // sleep a bit to avoid overwhelming the database 143 - tokio::time::sleep(std::time::Duration::from_millis(100)).await; 143 + tokio::time::sleep(std::time::Duration::from_millis(1200)).await; 144 144 145 145 i += 1; 146 146 }