Connexion Python框架集多进程
我尝试配置Connexion,以便在Flask框架中设置尽可能多的进程或线程数。这在烧瓶中是可能的,但似乎Connexion没有将此配置发送到烧瓶。我阅读了Connexion文档,但没有找到任何东西。这可能吗Connexion Python框架集多进程,python,flask,Python,Flask,我尝试配置Connexion,以便在Flask框架中设置尽可能多的进程或线程数。这在烧瓶中是可能的,但似乎Connexion没有将此配置发送到烧瓶。我阅读了Connexion文档,但没有找到任何东西。这可能吗 app = connexion.App(__name__, specification_dir='swagger/', debug=False, processes=4) app.run(port=8080, server='gevent') 我尝试在connexion.App中设置参数
app = connexion.App(__name__, specification_dir='swagger/', debug=False, processes=4)
app.run(port=8080, server='gevent')
我尝试在connexion.App中设置参数,但您无法设置此参数
连接版本:
connexion==1.1.9
我找到了解决办法。使用uWSGI运行应用程序。您可以将Flask WSGI应用程序与任何WSGI容器一起使用 以下是一个例子:
$ sudo pip3 install uwsgi
$ uwsgi --socket 0.0.0.0:8080 --protocol=http --callable app --file app.py --master -p 4 # use 4 worker processes