Skip to content

Commit

Permalink
make sure updated_at is up to date in artistinfocache
Browse files Browse the repository at this point in the history
  • Loading branch information
sentriz committed Oct 28, 2023
1 parent eac4db8 commit a34ac03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions artistinfocache/artistinfocache.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (a *ArtistInfoCache) Lookup(ctx context.Context, artist *db.Artist) (*db.Ar
if err := a.db.FirstOrCreate(&artistInfo, "id=?", artistInfo.ID).Error; err != nil {
return nil, fmt.Errorf("first or create artist info: %w", err)
}
if err := a.db.Save(&artistInfo).Error; err != nil {
return nil, fmt.Errorf("bump updated_at time: %w", err)
}

info, err := a.lastfmClient.ArtistGetInfo(artist.Name)
if err != nil {
Expand Down

0 comments on commit a34ac03

Please sign in to comment.