fix(podcast): slightly more robust downloading and concurrency (#433)

This commit is contained in:
Senan Kelly
2023-12-21 03:20:22 +00:00
committed by GitHub
parent 2f109f1982
commit f34cd2e213
4 changed files with 202 additions and 221 deletions

View File

@@ -388,6 +388,17 @@ func main() {
return nil
})
errgrp.Go(func() error {
defer logJob("podcast download")()
ctxTick(ctx, 5*time.Second, func() {
if err := podcast.DownloadTick(); err != nil {
log.Printf("failed to download podcast: %s", err)
}
})
return nil
})
errgrp.Go(func() error {
if *confPodcastPurgeAgeDays == 0 {
return nil