Uploaded image for project: 'ListenBrainz'
  1. ListenBrainz
  2. LB-891

Check that spotify importer is keeping up with user listens

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            alastairp Alastair Porter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Packages

                Version Package