添加状态检查
This commit is contained in:
parent
4da6efd629
commit
dbd0aff56a
@ -122,11 +122,11 @@ class DispatchHandler(tornado.web.RequestHandler):
|
||||
|
||||
def _selfCheckingHandler(self):
|
||||
cron_time = 2 * 60 + 5
|
||||
pdb.set_trace()
|
||||
#pdb.set_trace()
|
||||
ad_produce_time = my_redis.get("ad_produce_time") or 0
|
||||
ad_produce_status = my_redis.get("ad_produce") or 0
|
||||
now_stamp = int(datetime.datetime.timestamp(datetime.datetime.now()))
|
||||
timediff = now_stamp - ad_produce_time
|
||||
timediff = now_stamp - int(ad_produce_time)
|
||||
print(f"{now_stamp} {ad_produce_time}")
|
||||
if ad_produce_status != 1 or timediff > cron_time:
|
||||
self.write(json.dumps(
|
||||
|
Loading…
x
Reference in New Issue
Block a user