1.5 KiB
id, title, status, assignee, created_date, labels, dependencies, references, priority
| id | title | status | assignee | created_date | labels | dependencies | references | priority | |
|---|---|---|---|---|---|---|---|---|---|
| ML-27 | 11 copy-pasted Oban workers for refresh operations | To Do | 2026-04-20 08:51 |
|
medium |
Description
GitHub: created 2026-04-05 · updated 2026-04-12 · closed 2026-04-12 · not planned
Summary
Single-record refresh workers and their batch counterparts are nearly identical, differing only in the delegated function call. 11 workers share the same ~10-line structure.
Affected Workers
Single-record (6): ArtistRefreshDiscogsData, ArtistRefreshMusicBrainzData, ArtistRefreshWikipediaData, FetchArtistLastFmData, RecordRefreshMusicBrainzData, GenerateRecordEmbedding
Batch (5): ArtistRefreshAllDiscogsData, ArtistRefreshAllMusicBrainzData, ArtistRefreshAllWikipediaData, RecordRefreshAllMusicBrainzData, RecordGenerateAllEmbeddings
Suggested Fix
Consider a generic worker pattern or macro that accepts the delegated function as a parameter, reducing boilerplate while keeping each worker as a distinct module for queue routing.
Acceptance Criteria
- Boilerplate is reduced
- Each worker remains individually identifiable for Oban queue routing and monitoring
- No change in worker behaviour
- #1 Boilerplate is reduced
- #2 Each worker remains individually identifiable for Oban queue routing and monitoring
- #3 No change in worker behaviour