diff --git a/ad_interface_tornado.py b/ad_interface_tornado.py index b1f98cc..5295984 100644 --- a/ad_interface_tornado.py +++ b/ad_interface_tornado.py @@ -18,6 +18,7 @@ log = logging.getLogger(__name__) def send_cache_data(): + print("send cache start!") mydb = MysqlBase(**mysql_promotion_config) log.info("start!") now = datetime.datetime.today().strftime("%Y-%m-%d %H:%M:%S") @@ -76,7 +77,7 @@ def send_cache_data(): len_all = len(all) log.info(f"write {len_all} to cache!") log.info("bengin revome !") - + print("remove old recording!") remove_sql = f"select id,gameid,locationid from ad where '{now}'>=end_time" rm_data = mydb.query(remove_sql) if rm_data: @@ -159,10 +160,9 @@ def make_app(): if __name__ == "__main__": import pdb - send_cache_data() + #send_cache_data() print('start!') app = make_app() app.listen(ad_list_interface_port) tornado.ioloop.PeriodicCallback(send_cache_data, 60000).start() - # tornado.ioloop.IOLoop.current().call_at(time.time() + 60, lambda: sendNotify(conf, conf['sendtime1'])) tornado.ioloop.IOLoop.current().start()