def run(self): while (True): try: print "Anorak searcher thread has woken up\n" animes = list(model.get_animes()) for anime in animes: self.searchAnime(anime) # refresh anime metadata only once a day at a random hour (so we don't DDOS anidb) if self.date < datetime.datetime.now(): refresher = MetadataRefreshThread(animes) refresher.start() self.setMetadataRefreshDate() print "Anorak searcher thread resuming sleep\n" # reload settings just in case the search frequency changed self.settings = settings.getSettings() time.sleep(60*float(self.settings.get("Anorak", "searchFrequency"))) except: print "Something went wrong with the searching thread. Continuing anyways."
def run(self): while (True): try: print "Anorak searcher thread has woken up\n" animes = list(model.get_animes()) for anime in animes: self.searchAnime(anime) # refresh anime metadata only once a day at a random hour (so we don't DDOS anidb) if self.date < datetime.datetime.now(): refresher = MetadataRefreshThread(animes) refresher.start() self.setMetadataRefreshDate() print "Anorak searcher thread resuming sleep\n" # reload settings just in case the search frequency changed self.settings = settings.getSettings() time.sleep( 60 * float(self.settings.get("Anorak", "searchFrequency"))) except: print "Something went wrong with the searching thread. Continuing anyways."
def GET(self): """ List anime """ animes = model.get_animes() return render.index(animes, getAiring)