调整缓存数据生成脚本

This commit is contained in:
pengtao 2019-09-29 11:58:24 +08:00
parent 1d367bbca9
commit 70f1498681

View File

@ -92,7 +92,6 @@ def produce_task():
data = mydb.query(get_data_sql)
if data:
print(f"get {data}")
for line in data:
if line:
try:
@ -123,9 +122,9 @@ def produce_task():
log.error("split data failed", exc_info=True)
# 检查ID是否存在播放列表中以及播放次数是否完毕
if all:
print(f"all={all}")
for line in all:
if line:
print(f"line={line}")
try:
locationids = json.loads(line.get('locationid'))
for locationid in str(locationids).strip('[]').split(','):