Python 多进程不工作只有一个进程在服务器上运行
我正在调用一个Solr RestAPI来提取结果。我在Solr上有多个电话。因此,我使用多处理对Solr RestAPI进行并行调用 我附加了一段代码,其中我将一个chunk\u query列表传递给函数checktermsolr。问题是,我能够看到进程列表正在显示,但它们没有似乎正在运行。只有一个单个进程正在运行,其余进程未运行 一段代码:Python 多进程不工作只有一个进程在服务器上运行,python,solr,multiprocessing,threadpool,Python,Solr,Multiprocessing,Threadpool,我正在调用一个Solr RestAPI来提取结果。我在Solr上有多个电话。因此,我使用多处理对Solr RestAPI进行并行调用 我附加了一段代码,其中我将一个chunk\u query列表传递给函数checktermsolr。问题是,我能够看到进程列表正在显示,但它们没有似乎正在运行。只有一个单个进程正在运行,其余进程未运行 一段代码: chunk_query = ['str1', 'str2', 'str3'] pool = mp.Pool(processes=10) results =
chunk_query = ['str1', 'str2', 'str3']
pool = mp.Pool(processes=10)
results = pool.map_async(self.solr_obj.checkTermInSolr, [qry_part for qry_part in chunk_query])
pprint(results.get())
python程序和不运行的进程数似乎是正在工作/运行的。只有第一个进程正常运行,而其他进程未正常运行
root 39005 1.5 0.1 470052 30620 pts/3 Sl+ 16:43 0:00 python querysearch_mp.py
root 39006 0.0 0.0 250952 24596 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39007 0.0 0.0 250952 24596 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39008 0.0 0.0 250952 24600 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39009 0.0 0.0 250952 24504 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39010 0.0 0.0 250952 24608 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39011 0.0 0.0 250952 24608 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39012 0.0 0.0 250952 24608 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39013 0.0 0.0 248600 23528 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39014 0.0 0.0 248856 23540 pts/3 S+ 16:44 0:00 python querysearch_mp.py
root 39015 0.0 0.0 248856 23540 pts/3 S+ 16:44 0:00 python querysearch_mp.py
我是否在多处理或其他方面做错了什么