降低线程数
This commit is contained in:
@@ -29,12 +29,12 @@ def build_doc(item):
|
||||
def sync(city=None):
|
||||
log.info(f"开始同步出售信息至206 {index_name}")
|
||||
|
||||
seaweed_query = {'cat': 'district', 'status': 0}
|
||||
if pd.notna(city):
|
||||
seaweed_query['city'] = city
|
||||
seaweed_df = pd.read_csv(path + '/seaweed.csv', sep='@', encoding='UTF-8')
|
||||
if pd.notna(city):
|
||||
seaweed_df = seaweed_df[seaweed_df['city'] == city].copy()
|
||||
seaweed_df = seaweed_df.reset_index(drop=True)
|
||||
|
||||
with ThreadPoolExecutor(50) as pool:
|
||||
with ThreadPoolExecutor(30) as pool:
|
||||
def deal(index, item):
|
||||
if index % 1000 == 0:
|
||||
log.info("已处理" + str(index))
|
||||
|
||||
Reference in New Issue
Block a user