fix bug
This commit is contained in:
parent
d26f29dba9
commit
a50172a9e0
13
ad_tasks.py
13
ad_tasks.py
@ -96,19 +96,17 @@ def send_cache_data():
|
||||
except:
|
||||
item['y_offset'] = 0
|
||||
try:
|
||||
print(f"0={item}")
|
||||
temp = {}
|
||||
temp['jump_param'] = item.get('jump_param', "")
|
||||
if not item['ad_property']:
|
||||
item['ad_property']={}
|
||||
if not isinstance(item.get('ad_property', {}), dict):
|
||||
if not item.get('ad_property', {}):
|
||||
if not item.get('ad_property', {}) :
|
||||
item['ad_property'] = {}.update(temp)
|
||||
else:
|
||||
pdb.set_trace()
|
||||
item['ad_property'] = json.loads(item.get('ad_property', {}).replace("'", '"'))
|
||||
item['ad_property'] = json.loads(item.get('ad_property', {}).replace("‘", '"').replace("’", '"'))
|
||||
item['ad_property'].update(temp)
|
||||
print(f"item['ad_property']={item['ad_property']}")
|
||||
#item['ad_property']=json.dumps(item['ad_property'])
|
||||
print(f"1={item}")
|
||||
item['ad_property']=json.dumps(item['ad_property'])
|
||||
except Exception:
|
||||
log.error(f"write {item}", exc_info=True)
|
||||
|
||||
@ -145,7 +143,6 @@ def send_cache_data():
|
||||
remove_list = ('ad_num', 'gameid')
|
||||
for item in remove_list:
|
||||
line.pop(item)
|
||||
print(f"2={line}")
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user