When creating a record, queue a job to fetch artist info
This commit is contained in:
@@ -3,7 +3,8 @@ defmodule MusicLibrary.Worker.FetchArtistInfo do
|
||||
|
||||
@impl Oban.Worker
|
||||
def perform(%Oban.Job{args: %{"id" => artist_id}}) do
|
||||
with {:ok, _artist_info} <- MusicLibrary.Artists.fetch_artist_info(artist_id) do
|
||||
with {:ok, _artist_info} <- MusicLibrary.Artists.fetch_artist_info(artist_id),
|
||||
{:ok, _artist_info} <- MusicLibrary.Artists.fetch_image(artist_id) do
|
||||
:ok
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user