-
Task
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
The spotify recently-played endpoint returns 50 items per user.
When we process spotify listens for users, we iterate through all users one at a time until they are all processed, and then start again. If we get too many users who want to record their listens, there is a chance that we'll take so long to get back to a user after importing their listens that we miss a few.
Assuming ~3 minutes per song, there's about a 2.5h window to get back to the first user. We should log the average time taken to get back to a user, and also the average number of listens that get imported per user. If these numbers start to get too high then we will need to work out a way to increase the frequency at which we process listens - perhaps another worker or multiple threads.