diff --git a/handler/ad.py b/handler/ad.py index 7149db9..0b399d4 100644 --- a/handler/ad.py +++ b/handler/ad.py @@ -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!'}) diff --git a/ops/ad_produce.py b/ops/ad_produce.py index c31cef4..5f84d05 100644 --- a/ops/ad_produce.py +++ b/ops/ad_produce.py @@ -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'))