don't start purge job if podcast-purge-age-days not set

Co-authored-by: Alex McGrath <amk@amk.ie>
This commit is contained in:
sentriz
2023-09-27 13:53:36 +01:00
co-authored by Alex McGrath
parent f119659acf
commit 51cf57400e
+2
View File
@@ -301,6 +301,7 @@ func main() {
return nil return nil
}, noCleanup) }, noCleanup)
if *confPodcastPurgeAgeDays > 0 {
g.Add(func() error { g.Add(func() error {
log.Printf("starting job 'podcast purger'\n") log.Printf("starting job 'podcast purger'\n")
ticker := time.NewTicker(24 * time.Hour) ticker := time.NewTicker(24 * time.Hour)
@@ -311,6 +312,7 @@ func main() {
} }
return nil return nil
}, noCleanup) }, noCleanup)
}
if *confScanIntervalMins > 0 { if *confScanIntervalMins > 0 {
g.Add(func() error { g.Add(func() error {