修改不更新bug

This commit is contained in:
shenjian@fangjia.com
2023-03-07 14:31:47 +08:00
parent b7d4180cde
commit afefe99b0f
+6 -6
View File
@@ -72,7 +72,7 @@ def find_around_price(lng, lat):
def build_doc(item):
doc_dict = dict()
if 'avg_cost' in item and pd.notna(item['avg_cost']):
if 'avg_cost' in item:
doc_dict['avg_cost'] = item['avg_cost']
return doc_dict
@@ -136,11 +136,11 @@ def sync(city=None):
seaweed_df.loc[index, 'avg_cost'] = price
else:
seaweed_df.loc[index, 'avg_cost'] = None
with ThreadPoolExecutor(max_workers=80) as pool:
for index, item in seaweed_df.iterrows():
pool.submit(find_around_price_item, index, item)
# for index, item in seaweed_df.iterrows():
# find_around_price_item(index, item)
# with ThreadPoolExecutor(max_workers=80) as pool:
# for index, item in seaweed_df.iterrows():
# pool.submit(find_around_price_item, index, item)
for index, item in seaweed_df.iterrows():
find_around_price_item(index, item)
actions = list()
count = 0
for index, item in seaweed_df.iterrows():