修改不更新bug
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user