优化人均消费bug

This commit is contained in:
shenjian@fangjia.com
2023-03-06 15:49:30 +08:00
parent f746d854c7
commit 98266e9c2b
+4 -2
View File
@@ -131,8 +131,10 @@ def sync(city=None):
lng = commutils.format_lat_lng(item['lng'])
lat = commutils.format_lat_lng(item['lat'])
price = find_around_price(lng, lat)
seaweed_df.loc[index, 'avg_cost'] = price
if price > 0:
seaweed_df.loc[index, 'avg_cost'] = price
else:
seaweed_df.loc[index, 'avg_cost'] = None
with ThreadPoolExecutor(max_workers=30) as pool:
for index, item in seaweed_df.iterrows():
pool.submit(find_around_price_item, index, item)