Added anime twist cache

This commit is contained in:
Eduard Urbach 2017-07-12 02:57:53 +02:00
parent ed940c6543
commit a74e314dcb
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ var jobs = map[string]time.Duration{
"statistics": 15 * time.Minute,
"popular-anime": 20 * time.Minute,
"avatars": 30 * time.Minute,
"twist": 8 * time.Hour,
"sync-shoboi": 8 * time.Hour,
"refresh-episodes": 10 * time.Hour,
"refresh-track-titles": 10 * time.Hour,

View File

@ -18,6 +18,11 @@ func main() {
arn.PanicOnError(err)
idList := twistAnime.KitsuIDs()
// Save index in cache
arn.PanicOnError(arn.DB.Set("Cache", "animetwist index", &arn.ListOfIDs{
IDList: idList,
}))
color.Yellow("Refreshing twist.moe links for %d anime", len(idList))
for count, animeID := range idList {