注释ad 属性添加代码
This commit is contained in:
parent
bfb502f1ab
commit
d26f29dba9
33
ad_tasks.py
33
ad_tasks.py
@ -95,21 +95,22 @@ def send_cache_data():
|
|||||||
item['y_offset'] = item['area'].split(',')[-1].strip().strip(')')
|
item['y_offset'] = item['area'].split(',')[-1].strip().strip(')')
|
||||||
except:
|
except:
|
||||||
item['y_offset'] = 0
|
item['y_offset'] = 0
|
||||||
# try:
|
try:
|
||||||
# print(f"0={item}")
|
print(f"0={item}")
|
||||||
# temp = {}
|
temp = {}
|
||||||
# temp['jump_param'] = item.get('jump_param',"")
|
temp['jump_param'] = item.get('jump_param', "")
|
||||||
# if not isinstance(item.get('ad_property', {}), dict):
|
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)
|
item['ad_property'] = {}.update(temp)
|
||||||
# else:
|
else:
|
||||||
# item['ad_property'] = json.loads(item.get('ad_property', {}).replace("'",'"'))
|
pdb.set_trace()
|
||||||
# item['ad_property'].update(temp)
|
item['ad_property'] = json.loads(item.get('ad_property', {}).replace("'", '"'))
|
||||||
# print(f"item['ad_property']={item['ad_property']}")
|
item['ad_property'].update(temp)
|
||||||
# #item['ad_property']=json.dumps(item['ad_property'])
|
print(f"item['ad_property']={item['ad_property']}")
|
||||||
# print(f"1={item}")
|
#item['ad_property']=json.dumps(item['ad_property'])
|
||||||
# except Exception:
|
print(f"1={item}")
|
||||||
# log.error(f"write {item}",exc_info=True)
|
except Exception:
|
||||||
|
log.error(f"write {item}", exc_info=True)
|
||||||
|
|
||||||
all.append(item)
|
all.append(item)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -144,7 +145,7 @@ def send_cache_data():
|
|||||||
remove_list = ('ad_num', 'gameid')
|
remove_list = ('ad_num', 'gameid')
|
||||||
for item in remove_list:
|
for item in remove_list:
|
||||||
line.pop(item)
|
line.pop(item)
|
||||||
print(f"2={item}")
|
print(f"2={line}")
|
||||||
my_redis.hmset(f"ad::{line['id']}::info", 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", 60)
|
||||||
# my_redis.expire(f"ad::{line['id']}::info", 3600 * 24 * 7)
|
# my_redis.expire(f"ad::{line['id']}::info", 3600 * 24 * 7)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user