开启日志用于调试

This commit is contained in:
pengtao 2019-10-09 17:38:31 +08:00
parent 42b0c5a450
commit 6ee464a8d5
2 changed files with 2 additions and 1 deletions

View File

@ -207,7 +207,7 @@ class Ad(Resource):
if data:
condition = f"id='{self.args['id']}'"
self.mydb.update("ad", ad, condition)
time.sleep(2)
time.sleep(1)
if rebuild_ad():
log.info(f"rebuild cache via ad change!")
return jsonify({'code': 200, 'message': 'update adid={id} success!'})

View File

@ -131,6 +131,7 @@ def produce_task():
# 检查ID是否存在播放列表中以及播放次数是否完毕
if all:
for line in all:
log.info(f"get from sql was {all}")
if line:
try:
locationids = json.loads(line.get('locationid'))