tangled
alpha
login
or
join now
t1c.dev
/
rocksky
forked from
rocksky.app/rocksky
2
fork
atom
A decentralized music tracking and discovery platform built on AT Protocol 🎵
2
fork
atom
overview
issues
pulls
pipelines
Add 5s timeout to Spotify search calls
tsiry-sandratraina.com
1 month ago
c2fe573a
92166a70
+6
-4
1 changed file
expand all
collapse all
unified
split
crates
scrobbler
src
scrobbler.rs
+6
-4
crates/scrobbler/src/scrobbler.rs
···
208
208
209
209
let result = retry_spotify_call(
210
210
|| async {
211
211
-
spotify_client
212
212
-
.search(&format!(
211
211
+
tokio::time::timeout(
212
212
+
std::time::Duration::from_secs(5),
213
213
+
spotify_client.search(&format!(
213
214
r#"track:"{}" artist:"{}""#,
214
215
scrobble.track, scrobble.artist
215
215
-
))
216
216
-
.await
216
216
+
)),
217
217
+
)
218
218
+
.await?
217
219
},
218
220
"search",
219
221
)