fix: bind matcher source to playlist

This commit is contained in:
Josh Creek
2026-09-01 09:35:00 +01:00
parent d0952adaf9
commit e170bcf0ef
4 changed files with 45 additions and 13 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ func main() {
}
now := func() time.Time { return time.Now().UTC() }
worker := matcher.Worker{
Source: func(ctx context.Context, at time.Time, limit int) ([]domain.Candidate, error) {
return store.ListQueuedCandidates(ctx, db, at, limit)
Source: func(ctx context.Context, at time.Time, playlist domain.Playlist, limit int) ([]domain.Candidate, error) {
return store.ListQueuedCandidates(ctx, db, playlist, at, limit)
},
Creator: matcher.ProposalCreatorFunc(func(ctx context.Context, proposal domain.Proposal, ticketIDs map[string]string, at time.Time) error {
return store.CreateProposal(ctx, db, proposal, ticketIDs, at)