dag修改
This commit is contained in:
@@ -23,6 +23,7 @@ def build_doc(item):
|
||||
doc_dict['total_price'] = int(item['total_price'])
|
||||
return doc_dict
|
||||
|
||||
|
||||
def sync(city=None):
|
||||
log.info(f"开始同步户均总价信息至206 {index_name}")
|
||||
|
||||
@@ -66,14 +67,13 @@ def sync(city=None):
|
||||
if pd.notna(avg_price):
|
||||
min_avg_price = 0.8 * avg_price
|
||||
max_avg_rice = 1.2 * avg_price
|
||||
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366, min_avg_price=min_avg_price, max_avg_price=max_avg_rice)
|
||||
total_price = commutils.get_total_price(curr_city, curr_region, names, day_before=366,
|
||||
min_avg_price=min_avg_price, max_avg_price=max_avg_rice)
|
||||
seaweed_df.loc[index, 'total_price'] = total_price
|
||||
|
||||
for index, item in seaweed_df.iterrows():
|
||||
pool.submit(deal, index, item)
|
||||
|
||||
|
||||
|
||||
actions = list()
|
||||
count = 0
|
||||
for index, item in seaweed_df.iterrows():
|
||||
@@ -102,3 +102,6 @@ def sync(city=None):
|
||||
print(e)
|
||||
actions.clear()
|
||||
log.info(f"完成同步户均总价信息至206 {index_name}")
|
||||
|
||||
|
||||
sync()
|
||||
|
||||
Reference in New Issue
Block a user