Skip to content

Commit

Permalink
Add track entity cid type (#3705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jowlee authored Aug 18, 2022
1 parent 7bdb640 commit 9224bb6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion discovery-provider/src/tasks/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from src.queries.skipped_transactions import add_network_level_skipped_transaction
from src.tasks.celery_app import celery
from src.tasks.entity_manager.entity_manager import entity_manager_update
from src.tasks.entity_manager.utils import EntityType
from src.tasks.playlists import playlist_state_update
from src.tasks.social_features import social_feature_state_update
from src.tasks.sort_block_transactions import sort_block_transactions
Expand Down Expand Up @@ -332,7 +333,12 @@ def fetch_cid_metadata(db, user_factory_txs, track_factory_txs, entity_manager_t

cids_txhash_set.add((cid, txhash))
cid_to_user_id[cid] = user_id
cid_type[cid] = "playlist_data"
if event_args._entityType == EntityType.PLAYLIST:
cid_type[cid] = "playlist_data"
elif event_args._entityType == EntityType.TRACK:
cid_type[cid] = "track"
elif event_args._entityType == EntityType.USER:
cid_type[cid] = "user"

# user -> replica set string lookup, used to make user and track cid get_metadata fetches faster
user_to_replica_set = dict(
Expand Down

0 comments on commit 9224bb6

Please sign in to comment.