def GET(self): yield "uid\temail\t\t\tdays\tlastcheck\tnextcheck\terrcount\tstatus\n" accounts = xiamidb.scan() for account in accounts: account["last"] -= time.time() account["nexttime"] -= time.time() yield "%(uid)s\t%(email)s\t%(days)s\t%(last)s\t%(nexttime)s\t%(errcount)s\t%(status)s\n" % account
def GET(self): yield "uid\temail\t\t\tdays\tlastcheck\tnextcheck\terrcount\tstatus\n" accounts = xiamidb.scan() for account in accounts: account["last"] -= time.time() account["nexttime"] -= time.time() yield "%(uid)s\t%(email)s\t%(days)s\t%(last)s\t%(nexttime)s\t%(errcount)s\t%(status)s\n"%account
def daemon(): while True: accounts = xiamidb.scan(where="errcount<3 and nexttime<%s"%time.time()) for account in accounts: try: checkin(account) except: traceback.print_exc() print "checkin error" time.sleep(5) time.sleep(5)
def daemon(): while True: accounts = xiamidb.scan(where="errcount<3 and nexttime<%s" % time.time()) for account in accounts: try: checkin(account) except: traceback.print_exc() print "checkin error" time.sleep(5) time.sleep(5)