redis remove key 之前判断该key是否存在
This commit is contained in:
parent
3bd7da3a9f
commit
75b884d1c1
@ -36,9 +36,8 @@ def send_cache_data():
|
||||
log.info(f"line was {line}")
|
||||
item = {}
|
||||
try:
|
||||
item['id'], item['name'], item['ad_num'], item['ad_title'], item['ad_body'], item['ad_image'], item[
|
||||
'ad_url'], item['ad_sort'], item['companyid'], item['locationid'], item['gameid'], item[
|
||||
'appid'] = line
|
||||
item['id'], item['name'], item['ad_num'], item['ad_title'], item['ad_body'], item['ad_image'], item['ad_url'], \
|
||||
item['ad_sort'], item['companyid'], item['locationid'], item['gameid'], item['appid'] = line
|
||||
all.append(item)
|
||||
except Exception:
|
||||
log.error("split data failed", exc_info=True)
|
||||
@ -52,9 +51,8 @@ def send_cache_data():
|
||||
if line:
|
||||
item = {}
|
||||
try:
|
||||
item['id'], item['name'], item['ad_num'], item['ad_title'], item['ad_body'], item['ad_image'], item[
|
||||
'ad_url'], item['ad_sort'], item['companyid'], item['locationid'], item['gameid'], item[
|
||||
'appid'] = line
|
||||
item['id'], item['name'], item['ad_num'], item['ad_title'], item['ad_body'], item['ad_image'], item['ad_url'], \
|
||||
item['ad_sort'], item['companyid'], item['locationid'], item['gameid'], item['appid'] = line
|
||||
all.append(item)
|
||||
except Exception:
|
||||
log.error("split data failed", exc_info=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user