From 56b22ed00278c2a83538199ea290fba42f8ded68 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 20 Aug 2019 12:18:27 +0800 Subject: [PATCH] a --- ad_tasks.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ad_tasks.py b/ad_tasks.py index cf043ef..998ce78 100644 --- a/ad_tasks.py +++ b/ad_tasks.py @@ -96,14 +96,17 @@ def send_cache_data(): except: item['y_offset'] = 0 try: + print(f"0={item}") temp = {} temp['jump_param'] = item['jump_param'] + pdb.set_trace() if not isinstance(item.get('ad_property', {}), dict): - item['ad_property'] = dict(item.get('ad_property', {})) + item['ad_property'] = json.loads(item.get('ad_property', {})) item['ad_property'].update(temp) item['ad_property']=json.dumps(item['ad_property']) - except: - pass + print(f"1={item}") + except Except: + log.error(f"write {item}",exc_info=True) all.append(item) except Exception: @@ -138,6 +141,7 @@ def send_cache_data(): remove_list = ('ad_num', 'gameid') for item in remove_list: line.pop(item) + print(f"2={item}") my_redis.hmset(f"ad::{line['id']}::info", line) my_redis.expire(f"ad::{line['id']}::info", 60) # my_redis.expire(f"ad::{line['id']}::info", 3600 * 24 * 7)