Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions api/swagger/swagger-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8531,6 +8531,7 @@ paths:
- listen_streak_reminder
- weekly_rotation
- weekly_rotation_featured
- weekly_artist_recap
- fan_remix_contest_started
- fan_remix_contest_ended
- fan_remix_contest_ending_soon
Expand Down Expand Up @@ -17385,6 +17386,7 @@ components:
- $ref: "#/components/schemas/listen_streak_reminder_notification"
- $ref: "#/components/schemas/weekly_rotation_notification"
- $ref: "#/components/schemas/weekly_rotation_featured_notification"
- $ref: "#/components/schemas/weekly_artist_recap_notification"
- $ref: "#/components/schemas/fan_remix_contest_started_notification"
- $ref: "#/components/schemas/fan_remix_contest_ended_notification"
- $ref: "#/components/schemas/fan_remix_contest_ending_soon_notification"
Expand Down Expand Up @@ -17436,6 +17438,7 @@ components:
listen_streak_reminder: "#/components/schemas/listen_streak_reminder_notification"
weekly_rotation: "#/components/schemas/weekly_rotation_notification"
weekly_rotation_featured: "#/components/schemas/weekly_rotation_featured_notification"
weekly_artist_recap: "#/components/schemas/weekly_artist_recap_notification"
fan_remix_contest_started: "#/components/schemas/fan_remix_contest_started_notification"
fan_remix_contest_ended: "#/components/schemas/fan_remix_contest_ended_notification"
fan_remix_contest_ending_soon: "#/components/schemas/fan_remix_contest_ending_soon_notification"
Expand Down Expand Up @@ -18109,6 +18112,26 @@ components:
type: array
items:
$ref: "#/components/schemas/weekly_rotation_featured_notification_action"
weekly_artist_recap_notification:
required:
- actions
- group_id
- is_seen
- type
type: object
properties:
type:
type: string
group_id:
type: string
is_seen:
type: boolean
seen_at:
type: integer
actions:
type: array
items:
$ref: "#/components/schemas/weekly_artist_recap_notification_action"
comment_thread_notification_action:
required:
- data
Expand Down Expand Up @@ -19360,6 +19383,22 @@ components:
type: integer
data:
$ref: "#/components/schemas/weekly_rotation_featured_notification_action_data"
weekly_artist_recap_notification_action:
required:
- data
- specifier
- timestamp
- type
type: object
properties:
specifier:
type: string
type:
type: string
timestamp:
type: integer
data:
$ref: "#/components/schemas/weekly_artist_recap_notification_action_data"
comment_reaction_notification_action_data:
required:
- entity_id
Expand Down Expand Up @@ -19885,6 +19924,31 @@ components:
type: integer
rotation_count:
type: integer
weekly_artist_recap_notification_action_data:
description: An artist's recap of the period that just closed (an ISO (year, week) pair, Wednesday to Wednesday UTC). Plays exclude the artist's own. rotation_save_count is how many of the saves came from listeners whose Weekly Rotation included the track. top_city is omitted when no play had a city.
required:
- year
- week
- play_count
- follower_count
- save_count
- rotation_save_count
type: object
properties:
year:
type: integer
week:
type: integer
play_count:
type: integer
follower_count:
type: integer
save_count:
type: integer
rotation_save_count:
type: integer
top_city:
type: string
artist_remix_contest_submissions_notification_action_data:
required:
- entity_id
Expand Down
2 changes: 1 addition & 1 deletion api/v1_notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const (

type GetNotificationsQueryParams struct {
Limit int `query:"limit" default:"20" validate:"min=0,max=100"`
Types []string `query:"types" validate:"dive,oneof=announcement follow repost save remix cosign create tip_receive tip_send challenge_reward repost_of_repost save_of_repost tastemaker reaction supporter_dethroned supporter_rank_up supporting_rank_up milestone track_added_to_playlist tier_change trending trending_playlist trending_underground usdc_purchase_buyer usdc_purchase_seller track_added_to_purchased_album request_manager approve_manager_request track_collaborator_invite track_collaborator_accept claimable_reward comment comment_thread comment_mention comment_reaction listen_streak_reminder weekly_rotation weekly_rotation_featured fan_remix_contest_started fan_remix_contest_ended fan_remix_contest_ending_soon fan_remix_contest_winners_selected fan_remix_contest_submission artist_remix_contest_ended artist_remix_contest_ending_soon artist_remix_contest_submissions fan_club_text_post remix_contest_update"`
Types []string `query:"types" validate:"dive,oneof=announcement follow repost save remix cosign create tip_receive tip_send challenge_reward repost_of_repost save_of_repost tastemaker reaction supporter_dethroned supporter_rank_up supporting_rank_up milestone track_added_to_playlist tier_change trending trending_playlist trending_underground usdc_purchase_buyer usdc_purchase_seller track_added_to_purchased_album request_manager approve_manager_request track_collaborator_invite track_collaborator_accept claimable_reward comment comment_thread comment_mention comment_reaction listen_streak_reminder weekly_rotation weekly_rotation_featured weekly_artist_recap fan_remix_contest_started fan_remix_contest_ended fan_remix_contest_ending_soon fan_remix_contest_winners_selected fan_remix_contest_submission artist_remix_contest_ended artist_remix_contest_ending_soon artist_remix_contest_submissions fan_club_text_post remix_contest_update"`
GroupID string `query:"group_id" validate:"omitempty"`
Timestamp float64 `query:"timestamp" validate:"omitempty,min=0"`
}
Expand Down
5 changes: 5 additions & 0 deletions indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ func (ci *CoreIndexer) startParityJobs(ctx context.Context) {
jobs.NewWeeklyRotationFeaturedNotificationsJob(ci.Config, ci.pool).
ScheduleEvery(ctx, 30*time.Second)

// Weekly recap for artists (plays, new followers, top city, saves) for
// the period that just closed. Same timing as the featured notification.
jobs.NewWeeklyArtistRecapNotificationsJob(ci.Config, ci.pool).
ScheduleEvery(ctx, 30*time.Second)

// Backfill missing track bpm / musical_key from content-node audio
// analyses. Mirrors apps' repair_audio_analyses celery task, whose beat
// schedule ran every 3 minutes. Needs the SDK for content-node discovery.
Expand Down
Loading