class ArtistPictureJob < ActiveJob::Base
  queue_as :sync

  def perform artist
    if last = artist.albums.covered.order(:released_at).last
      artist.picture = last.cover.file
      artist.save!
    end
  end
end
