def getChecked(self, checknumber, page=None, *arg1, **arg2): checknumber = checknumber try: feedset = FeedSet.all().fetch(1) feedset = feedset[0] except Exception: self.initDb() feedset = FeedSet.all().fetch(1) feedset = feedset[0] defDir = feedset.defDir defStat = feedset.defStat defDate = feedset.defDate fetchelimit = feedset.last_entry fetchllimit = feedset.last_feedslist + 1 # fix the stat self.changefeedstat(defDate, defStat, feedset, checknumber) # fix the entry result = self.checkentry(fetchelimit, defDir, defStat, defDate, feedset, checknumber) if result == True: logging.info('the Entry checked successful!!!') result = self.checkfeedslist(fetchllimit, defDir, defStat, defDate, feedset, checknumber) if result == True: logging.info('the FeedsList checked successful!!!') feedset.stat = True else: logging.info('the FeedsList checked fail!!!') feedset.stat = False else: logging.info('the Entry checked is fail,please check the db') feedset.stat = False feedset.last_checked = datetime.now() feedset.put()
def get(self): self.getChecked(FeedSet.all().fetch(1)[0].check_db_num)
def get(self): self.getdb(FeedSet.all().fetch(1)[0].fetch_db_num)