sync: populate image cache

This commit is contained in:
mappu 2022-12-31 14:33:51 +13:00
parent 45da798791
commit 8321129ac8
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,9 @@ dokku storage:mount teafolio /srv/teafolio-dokku/config.toml:/app/config.toml
## CHANGELOG ## CHANGELOG
2022-12-31 v1.3.1
- Fix missing images on homepage
2022-12-31 v1.3.0 2022-12-31 v1.3.0
- Add `OverrideOrder` configuration option to insert repos at specific positions - Add `OverrideOrder` configuration option to insert repos at specific positions
- Cache target image URLs to improve homepage load performance - Cache target image URLs to improve homepage load performance

View File

@ -117,6 +117,11 @@ func (this *Application) sync(ctx context.Context) (bool, error) {
log.Printf("loading topics for '%s': %s", rr.Name, err) log.Printf("loading topics for '%s': %s", rr.Name, err)
} }
err = this.gitea.PopulateImages(ctx, &rr)
if err != nil {
log.Printf("loading images for '%s': %s", rr.Name, err)
}
// Save // Save
repos[i] = rr repos[i] = rr
} }