Fix lint errors
This commit is contained in:
@@ -67,7 +67,7 @@ var _ = Describe("CachedHttpClient", func() {
|
|||||||
body, err = ioutil.ReadAll(resp.Body)
|
body, err = ioutil.ReadAll(resp.Body)
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
Expect(string(body)).To(Equal("Hello, []"))
|
Expect(string(body)).To(Equal("Hello, []"))
|
||||||
Expect(string(header)).To(Equal("this is a header"))
|
Expect(header).To(Equal("this is a header"))
|
||||||
Expect(requestsReceived).To(Equal(3))
|
Expect(requestsReceived).To(Equal(3))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ func (l *lastfmAgent) GetURL(name, mbid string) (string, error) {
|
|||||||
return "", ErrNotFound
|
return "", ErrNotFound
|
||||||
}
|
}
|
||||||
return a.URL, nil
|
return a.URL, nil
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l *lastfmAgent) GetBiography(name, mbid string) (string, error) {
|
func (l *lastfmAgent) GetBiography(name, mbid string) (string, error) {
|
||||||
|
|||||||
@@ -65,13 +65,12 @@ func (e *externalInfo2) UpdateArtistInfo(ctx context.Context, id string, similar
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO Uncomment
|
|
||||||
// If we have fresh info, just return it
|
// If we have fresh info, just return it
|
||||||
//if time.Since(artist.ExternalInfoUpdatedAt) < consts.ArtistInfoTimeToLive {
|
if time.Since(artist.ExternalInfoUpdatedAt) < time.Second { //consts.ArtistInfoTimeToLive {
|
||||||
// log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name)
|
log.Debug("Found cached ArtistInfo", "updatedAt", artist.ExternalInfoUpdatedAt, "name", artist.Name)
|
||||||
// err := e.loadSimilar(ctx, artist, includeNotPresent)
|
err := e.loadSimilar(ctx, artist, includeNotPresent)
|
||||||
// return artist, err
|
return artist, err
|
||||||
//}
|
}
|
||||||
log.Debug(ctx, "ArtistInfo not cached", "updatedAt", artist.ExternalInfoUpdatedAt, "id", id, "name", artist.Name)
|
log.Debug(ctx, "ArtistInfo not cached", "updatedAt", artist.ExternalInfoUpdatedAt, "id", id, "name", artist.Name)
|
||||||
|
|
||||||
wg := &sync.WaitGroup{}
|
wg := &sync.WaitGroup{}
|
||||||
|
|||||||
Reference in New Issue
Block a user