Example #1
0
 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
Example #2
0
 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
Example #3
0
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)
Example #4
0
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)