This commit is contained in:
pengtao 2019-09-16 17:23:01 +08:00
parent 93445339fb
commit 03c9847e8d

View File

@ -48,12 +48,12 @@ def split_ad_info(localtionid, line):
def sadd_adkey(key, line, item): def sadd_adkey(key, line, item):
my_redis.sadd(key, line['id']) my_redis.sadd(key, line['id'])
my_redis.expire(key, 60*60) my_redis.expire(key, 60*2)
info_key = f"adinfo::{line['id']}::info" info_key = f"adinfo::{line['id']}::info"
new_line = split_ad_info(item, line) new_line = split_ad_info(item, line)
if new_line: if new_line:
my_redis.hmset(info_key, new_line) my_redis.hmset(info_key, new_line)
my_redis.expire(info_key, 60 * 60) my_redis.expire(info_key, 60 * 2)
else: else:
log.error(f"split adinfo about locationid failed! localtionid={item} ") log.error(f"split adinfo about locationid failed! localtionid={item} ")