930 B
930 B
id, title, status, assignee, created_date, labels, dependencies, references, priority
| id | title | status | assignee | created_date | labels | dependencies | references | priority | |
|---|---|---|---|---|---|---|---|---|---|
| ML-47 | PruneAssets worker has direct Repo queries | Done | 2026-04-20 08:53 |
|
medium |
Description
GitHub: created 2026-03-25 · updated 2026-03-25 · closed 2026-03-25
Description
PruneAssets worker (lib/music_library/worker/prune_assets.ex:16-35) builds Ecto queries and calls Repo.delete_all directly, violating the convention that workers are thin wrappers delegating to context modules. All other workers delegate to context functions. This logic should live in MusicLibrary.Assets.
Expected behavior
Extract the query and deletion into an Assets.prune_unreferenced/0 context function, and have the worker call it.
Found during
Codebase consistency audit (2026-03-25)