def run(self): QueueItem.run(self) try: sickrage.LOGGER.info("Beginning daily search for new episodes") foundResults = searchForNeededEpisodes() if not len(foundResults): sickrage.LOGGER.info("No needed episodes found") else: for result in foundResults: # just use the first result for now sickrage.LOGGER.info("Downloading " + result.name + " from " + result.provider.name) self.success = snatchEpisode(result) # give the CPU a break gen.sleep(cpu_presets[sickrage.CPU_PRESET]) QueueItem.finish(self) except Exception: sickrage.LOGGER.debug(traceback.format_exc()) if self.success is None: self.success = False self.finish()
def run(self): super(DailySearchQueueItem, self).run() self.started = True try: sickrage.srCore.srLogger.info("Beginning daily search for new episodes") foundResults = searchForNeededEpisodes() if foundResults: for result in foundResults: # just use the first result for now sickrage.srCore.srLogger.info("Downloading " + result.name + " from " + result.provider.name) self.success = snatchEpisode(result) # give the CPU a break time.sleep(cpu_presets[sickrage.srCore.srConfig.CPU_PRESET]) else: sickrage.srCore.srLogger.info("No needed episodes found") except Exception: sickrage.srCore.srLogger.debug(traceback.format_exc())
def run(self): self.started = True try: sickrage.app.log.info("Starting daily search for new episodes") foundResults = searchForNeededEpisodes() if foundResults: for result in foundResults: # just use the first result for now sickrage.app.log.info("Downloading " + result.name + " from " + result.provider.name) self.success = snatchEpisode(result) # give the CPU a break time.sleep(cpu_presets[sickrage.app.config.cpu_preset]) else: sickrage.app.log.info("No needed episodes found") except Exception: sickrage.app.log.debug(traceback.format_exc()) finally: sickrage.app.log.info("Finished daily search for new episodes")