Add async job to fetch artist image

This commit is contained in:
Claudio Ortolina
2025-04-27 21:20:12 +01:00
parent 3d3e758a7a
commit f5b783bdff
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,10 @@
defmodule MusicLibrary.Worker.FetchArtistImage do
use Oban.Worker, queue: :default, max_attempts: 3
@impl Oban.Worker
def perform(%Oban.Job{args: %{"id" => artist_id}}) do
with {:ok, _artist_info} <- MusicLibrary.Artists.fetch_image(artist_id) do
:ok
end
end
end