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
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
connectrpc.com/connect v1.18.1
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Doist/unfurlist v0.0.0-20250409100812-515f2735f8e5
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602042514-5ed068b34326
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602042514-5ed068b34326
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602052835-dca79f030639
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602052835-dca79f030639
github.com/aquasecurity/esquery v0.2.0
github.com/axiomhq/axiom-go v0.23.0
github.com/axiomhq/hyperloglog v0.2.5
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63n
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602042514-5ed068b34326 h1:7pUQd5PwFFPltQ/2jRWOFllLTI0NZ7zeoOj/BBh9eUo=
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602042514-5ed068b34326/go.mod h1:wiFXmVbIUkN2D5lRshknaARCKhzbHtCBKRCZe6UOnVs=
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602042514-5ed068b34326 h1:/HLzhNWnzRxFUOd+AtxyLUb23lEb/6LUbawOaRhtIOM=
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602042514-5ed068b34326/go.mod h1:LZKiU9vBYzlZzn6oPRHHLPXteBtMKQPegNH9bX9JuH8=
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602052835-dca79f030639 h1:vhhEm9AW1KKfZiR1+pXdLwbWKaEa6MBNTRv8xvWsd9c=
github.com/OpenAudio/go-openaudio v1.3.1-0.20260602052835-dca79f030639/go.mod h1:wiFXmVbIUkN2D5lRshknaARCKhzbHtCBKRCZe6UOnVs=
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602052835-dca79f030639 h1:lWFDHYYA4lXQbt8bbRlJf9vVRyw/ZCrNFzkugbq+oVc=
github.com/OpenAudio/go-openaudio/pkg/etl v1.3.1-0.20260602052835-dca79f030639/go.mod h1:LZKiU9vBYzlZzn6oPRHHLPXteBtMKQPegNH9bX9JuH8=
github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA=
github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8=
github.com/VictoriaMetrics/fastcache v1.12.2 h1:N0y9ASrJ0F6h0QaC3o6uJb3NIZ9VKLjCM7NQbSmF7WI=
Expand Down
6 changes: 6 additions & 0 deletions indexer/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ func (ci *CoreIndexer) startParityJobs(ctx context.Context) {

jobs.NewRemixContestNotificationsJob(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.
jobs.NewRepairAudioAnalysesJob(ci.Config, ci.pool, ci.openAudioSDK).
ScheduleEvery(ctx, 3*time.Minute)
}

func (ci *CoreIndexer) Close() {
Expand Down
26 changes: 26 additions & 0 deletions jobs/musical_key.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package jobs

// validMusicalKeys mirrors the apps indexer's MusicalKey enum
// (discovery-provider src/tasks/metadata.py). Note: flats only, no sharps —
// "C# minor" is NOT a valid key; the equivalent is "D flat minor".
var validMusicalKeys = map[string]bool{
"A major": true, "A minor": true,
"B flat major": true, "B flat minor": true,
"B major": true, "B minor": true,
"C major": true, "C minor": true,
"D flat major": true, "D flat minor": true,
"D major": true, "D minor": true,
"E flat major": true, "E flat minor": true,
"E major": true, "E minor": true,
"F major": true, "F minor": true,
"G flat major": true, "G flat minor": true,
"G major": true, "G minor": true,
"A flat major": true, "A flat minor": true,
"Silence": true,
}

// isValidMusicalKey reports whether s is one of the recognized musical keys.
// Mirrors apps' is_valid_musical_key (src/tasks/metadata.py).
func isValidMusicalKey(s string) bool {
return validMusicalKeys[s]
}
Loading
Loading