Skip to content

Commit

Permalink
Add playlist id offset to legacy indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacsolo committed Jul 29, 2022
1 parent 9af986c commit 18b715e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion discovery-provider/src/tasks/playlists.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
)

logger = logging.getLogger(__name__)
MIN_PLAYLIST_ID = 400000


def playlist_state_update(
Expand Down Expand Up @@ -63,7 +64,7 @@ def playlist_state_update(
)

# parse playlist event to add metadata to record
playlist_record = parse_playlist_event(
playlist_record: Playlist = parse_playlist_event(
self,
update_task,
entry,
Expand All @@ -72,6 +73,9 @@ def playlist_state_update(
block_timestamp,
session,
)
if playlist_record.playlist_id > MIN_PLAYLIST_ID:
logger.info(f"index.py | playlists.py | Playlist {playlist_record.playlist_id} is above the playlist ID offset {MIN_PLAYLIST_ID}. Skipping transaction.")
continue

# process playlist record
if playlist_record is not None:
Expand Down

0 comments on commit 18b715e

Please sign in to comment.