diff --git a/discovery-provider/src/api/v1/playlists.py b/discovery-provider/src/api/v1/playlists.py index 0073f6bcb04..ed4688b8274 100644 --- a/discovery-provider/src/api/v1/playlists.py +++ b/discovery-provider/src/api/v1/playlists.py @@ -143,7 +143,6 @@ def get(self, playlist_id): args = current_user_parser.parse_args() current_user_id = get_current_user_id(args) playlist = get_playlist(playlist_id, current_user_id) - logger.info(f"asdf playlist {playlist}") if playlist: tracks = get_tracks_for_playlist(playlist_id, current_user_id) playlist["tracks"] = tracks diff --git a/discovery-provider/src/queries/get_playlists.py b/discovery-provider/src/queries/get_playlists.py index 2fa68a20bf3..c63974ac046 100644 --- a/discovery-provider/src/queries/get_playlists.py +++ b/discovery-provider/src/queries/get_playlists.py @@ -99,7 +99,6 @@ def get_unpopulated_playlists(): key = make_cache_key(args) (playlists, playlist_ids) = get_unpopulated_playlists() - logger.info(f"asdf unpopulated playlists {playlists}") # bundle peripheral info into playlist results playlists = populate_playlist_metadata( session, diff --git a/discovery-provider/src/tasks/entity_manager.py b/discovery-provider/src/tasks/entity_manager.py index 31f6bd0e457..6798f528a46 100644 --- a/discovery-provider/src/tasks/entity_manager.py +++ b/discovery-provider/src/tasks/entity_manager.py @@ -444,5 +444,5 @@ def process_playlist_data_event( playlist_record.metadata_multihash = metadata_cid logger.info( - f"asdf index.py | AudiusData | Updated playlist record {playlist_record}" + f"index.py | AudiusData | Updated playlist record {playlist_record}" ) diff --git a/discovery-provider/src/tasks/index.py b/discovery-provider/src/tasks/index.py index 22871cda05d..34926e53a9c 100644 --- a/discovery-provider/src/tasks/index.py +++ b/discovery-provider/src/tasks/index.py @@ -748,7 +748,7 @@ def index_blocks(self, db, blocks_list): session.commit() metric.save_time({"scope": "commit_time"}, start_time=commit_start_time) logger.info( - f"asdf index.py | session committed to db for block={block_number} in {time.time() - commit_start_time}s" + f"index.py | session committed to db for block={block_number} in {time.time() - commit_start_time}s" ) except Exception as e: # Use 'commit' as the tx hash here. diff --git a/discovery-provider/src/utils/redis_cache.py b/discovery-provider/src/utils/redis_cache.py index 1d0f95e2ee1..bd52b410ae6 100644 --- a/discovery-provider/src/utils/redis_cache.py +++ b/discovery-provider/src/utils/redis_cache.py @@ -31,7 +31,6 @@ def use_redis_cache(key, ttl_sec, work_func): redis = redis_connection.get_redis() cached_value = get_json_cached_key(redis, key) if cached_value: - logger.info(f"asdf use redis cache {cached_value}") return cached_value to_cache = work_func() set_json_cached_key(redis, key, to_cache, ttl_sec) @@ -145,7 +144,6 @@ def inner_wrap(*args, **kwargs): if cached_resp: if transform is not None: return transform(cached_resp) - logger.info(f"asdf get cached response {cached_resp}") return cached_resp, 200 @@ -155,7 +153,6 @@ def inner_wrap(*args, **kwargs): resp, status_code = response if status_code < 400: set_json_cached_key(redis, key, resp, ttl_sec) - logger.info(f"asdf get non cached response {resp}") return resp, status_code set_json_cached_key(redis, key, response, ttl_sec) diff --git a/libs/src/api/entityManager.ts b/libs/src/api/entityManager.ts index 4d5070c096a..67d5b6cc252 100644 --- a/libs/src/api/entityManager.ts +++ b/libs/src/api/entityManager.ts @@ -33,11 +33,6 @@ export interface PlaylistOperationResponse { const { encodeHashId, decodeHashId } = Utils -// Minimum playlist ID, intentionally higher than legacy playlist ID range -const MIN_PLAYLIST_ID = 400000 -// Maximum playlist ID, reflects postgres max integer value -const MAX_PLAYLIST_ID = 2147483647 - type PlaylistTrackId = { time: number; track: number; metadata_time?: number } type PlaylistContents = { @@ -328,7 +323,6 @@ export class EntityManager extends Base { this.REQUIRES(Services.CREATOR_NODE) const playlist = await this.getFullPlaylist(playlistId, userId) - console.log('asdf existing playlist', playlist) const updatedPlaylistTracks = this.mapAddedTimestamps( playlist.added_timestamps @@ -399,7 +393,6 @@ export class EntityManager extends Base { const entityType = EntityType.PLAYLIST this.REQUIRES(Services.CREATOR_NODE) const playlist = await this.getFullPlaylist(playlistId, userId) - console.log('asdf existing playlist', playlist) const existingPlaylistTracks = this.mapAddedTimestamps( playlist.added_timestamps @@ -472,9 +465,7 @@ export class EntityManager extends Base { const updateAction = Action.UPDATE const entityType = EntityType.PLAYLIST this.REQUIRES(Services.CREATOR_NODE) - console.log('asdf get full playlist ', { playlistId, userId }) const playlist = await this.getFullPlaylist(playlistId, userId) - console.log('asdf existing playlist', playlist) const existingPlaylistTracks = this.mapAddedTimestamps( playlist.added_timestamps @@ -552,14 +543,6 @@ export class EntityManager extends Base { let error = null let resp: any try { - console.log('asdf managing entity', { - userId, - entityType, - entityId, - action, - metadataMultihash - }) - resp = await this.contracts.EntityManagerClient?.manageEntity( userId, entityType, @@ -571,7 +554,6 @@ export class EntityManager extends Base { return { txReceipt: resp.txReceipt, error } } catch (e) { error = (e as Error).message - console.log('asdf manageEntity error', error) return { txReceipt: null, error } } } diff --git a/libs/src/services/schemaValidator/schemas/playlistSchema.json b/libs/src/services/schemaValidator/schemas/playlistSchema.json index 34ee4fee23b..261828673c8 100644 --- a/libs/src/services/schemaValidator/schemas/playlistSchema.json +++ b/libs/src/services/schemaValidator/schemas/playlistSchema.json @@ -11,8 +11,11 @@ "default": null }, "playlist_contents": { - "type": ["array", "null"], - "default": [] + "type": "object", + "$ref": "#/definitions/PlaylistContents", + "default": { + "track_ids": [] + } }, "playlist_name": { "type": ["string", "null"], @@ -51,6 +54,17 @@ "maxLength": 46, "pattern": "^Qm[a-zA-Z0-9]{44}$", "title": "CID" + }, + "PlaylistContents": { + "type": "object", + "additionalProperties": false, + "properties": { + "track_ids": { + "type": "array", + "default": [] + } + }, + "title": "PlaylistContents" } } }