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.

Increase service timeouts to 120 seconds Increase service timeouts to 120 seconds

Remove an unnecessary 4s delay in apps/ws/src/main.ts. Extend
Effect.timeout from 10s to 120s across actor, nowPlaying and scrobble
services to reduce premature failures

+7 -9
-2
apps/ws/src/main.ts
··· 68 68 69 69 logger.info` Cursor: ${event.time_us}`; 70 70 71 - await new Promise((resolve) => setTimeout(resolve, 4000)); 72 - 73 71 try { 74 72 const nowPlayings = await getNowPlayings(ctx); 75 73 const scrobbles = await getScrobbles(ctx);
+1 -1
apps/ws/src/services/getActorAlbums.ts
··· 15 15 }), 16 16 Effect.flatMap(presentation), 17 17 Effect.retry({ times: 3 }), 18 - Effect.timeout("10 seconds"), 18 + Effect.timeout("120 seconds"), 19 19 Effect.catchAll((error) => 20 20 Effect.fail(new Error(`Failed to retrieve albums: ${error}`)), 21 21 ),
+1 -1
apps/ws/src/services/getActorArtists.ts
··· 8 8 retrieve({ ctx, params: { did, offset: 0, limit: 20 } }), 9 9 Effect.flatMap(presentation), 10 10 Effect.retry({ times: 3 }), 11 - Effect.timeout("10 seconds"), 11 + Effect.timeout("120 seconds"), 12 12 Effect.catchAll((error) => 13 13 Effect.fail(new Error(`Failed to retrieve artists: ${error}`)), 14 14 ),
+1 -1
apps/ws/src/services/getActorScrobbles.ts
··· 15 15 }), 16 16 Effect.flatMap(presentation), 17 17 Effect.retry({ times: 3 }), 18 - Effect.timeout("10 seconds"), 18 + Effect.timeout("120 seconds"), 19 19 Effect.catchAll((error) => 20 20 Effect.fail(new Error(`Failed to retrieve scrobbles: ${error}`)), 21 21 ),
+1 -1
apps/ws/src/services/getActorSongs.ts
··· 12 12 }, 13 13 }), 14 14 Effect.retry({ times: 3 }), 15 - Effect.timeout("10 seconds"), 15 + Effect.timeout("120 seconds"), 16 16 Effect.catchAll((error) => 17 17 Effect.fail(new Error(`Failed to retrieve songs: ${error}`)), 18 18 ),
+1 -1
apps/ws/src/services/getNowPlayings.ts
··· 8 8 retrieve({ ctx, params: { size: 7 } }), 9 9 Effect.flatMap(presentation), 10 10 Effect.retry({ times: 3 }), 11 - Effect.timeout("10 seconds"), 11 + Effect.timeout("120 seconds"), 12 12 Effect.catchAll((error) => 13 13 Effect.fail( 14 14 new Error(`Failed to retrieve now playing songs: ${error}`),
+1 -1
apps/ws/src/services/getScrobbles.ts
··· 14 14 }, 15 15 }), 16 16 Effect.retry({ times: 3 }), 17 - Effect.timeout("10 seconds"), 17 + Effect.timeout("120 seconds"), 18 18 Effect.catchAll((error) => 19 19 Effect.fail(new Error(`Failed to retrieve scrobbles: ${error}`)), 20 20 ),
+1 -1
apps/ws/src/services/getScrobblesChart.ts
··· 14 14 }), 15 15 Effect.flatMap(presentation), 16 16 Effect.retry({ times: 3 }), 17 - Effect.timeout("10 seconds"), 17 + Effect.timeout("120 seconds"), 18 18 Effect.catchAll((error) => 19 19 Effect.fail(new Error(`Failed to retrieve scrobbles chart: ${error}`)), 20 20 ),