修改不更新bug
This commit is contained in:
@@ -72,7 +72,7 @@ def find_around_price(lng, lat):
|
|||||||
|
|
||||||
def build_doc(item):
|
def build_doc(item):
|
||||||
doc_dict = dict()
|
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']
|
doc_dict['avg_cost'] = item['avg_cost']
|
||||||
return doc_dict
|
return doc_dict
|
||||||
|
|
||||||
@@ -136,11 +136,11 @@ def sync(city=None):
|
|||||||
seaweed_df.loc[index, 'avg_cost'] = price
|
seaweed_df.loc[index, 'avg_cost'] = price
|
||||||
else:
|
else:
|
||||||
seaweed_df.loc[index, 'avg_cost'] = None
|
seaweed_df.loc[index, 'avg_cost'] = None
|
||||||
with ThreadPoolExecutor(max_workers=80) as pool:
|
# with ThreadPoolExecutor(max_workers=80) as pool:
|
||||||
for index, item in seaweed_df.iterrows():
|
# for index, item in seaweed_df.iterrows():
|
||||||
pool.submit(find_around_price_item, index, item)
|
# pool.submit(find_around_price_item, index, item)
|
||||||
# for index, item in seaweed_df.iterrows():
|
for index, item in seaweed_df.iterrows():
|
||||||
# find_around_price_item(index, item)
|
find_around_price_item(index, item)
|
||||||
actions = list()
|
actions = list()
|
||||||
count = 0
|
count = 0
|
||||||
for index, item in seaweed_df.iterrows():
|
for index, item in seaweed_df.iterrows():
|
||||||
|
|||||||
Reference in New Issue
Block a user