Commit 0436bc65 by chenyuanjie

ES异常销量置为0

parent bcfc0971
......@@ -67,7 +67,7 @@ class EsUpdate(object):
self.df_need_update = self.df_asin.join(
self.df_es_asin, on=['asin'], how='inner'
).withColumn(
'asin_bought_month', F.lit(None)
'asin_bought_month', F.lit(0)
).cache()
print("ES待更新的数据量为:", self.df_need_update.count())
print(f"正在更新ES数据,更新索引:{self.index_name}")
......@@ -77,7 +77,7 @@ class EsUpdate(object):
.options(**self.es_options) \
.mode("append") \
.save()
print(f"ES{self.index_name}索引更新完毕!")
print(f"ES {self.index_name} 索引更新完毕!")
except Exception as e:
print("An error occurred while writing to Elasticsearch:", str(e))
CommonUtil.send_wx_msg(['chenyuanjie'], '\u26A0 ES月销数据更新失败', f'失败索引:{self.index_name}')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment