在Eclipse中终止Flask的内部服务器(Aptana Pydev) [英] Terminating Flask's Internal Server in Eclipse ( Aptana Pydev)
问题描述
我正在使用flask的内部web服务器(Werkzeug / 0.10.1 Python / 2.7.6)来开发瓶子。
当我运行我的项目时一切顺利,但是当我终止运行时,我的应用程序服务器保持活动状态。
socket.error:[Errno 98]已经在使用的地址
以前我用的是没有aptana的pydev,工作正常。现在对于每一个运行我手动杀死过程,这是非常恼人的。
我使用的是Ubuntu和virtualenv。
我怎样才能克服这个问题?
谢谢 解决方案
Trick在运行应用程序时传递use_reloader = False。
app.run(0.0.0.0 ,5051,debug = True,use_reloader = False)
I am using Aptana plugin in eclipse Luna. Pydev is already there in Aptana.
I am doing flask development using flask's internal web server (Werkzeug/0.10.1 Python/2.7.6).
When i run my project everything goes well but when i terminate run, my app server remain active.
It keeps serving and when i run my project again it gives me following socket error.
socket.error: [Errno 98] Address already in use
Previously i was using pydev without aptana and it was working fine. Now for every run i am killing process manually which is very annoying.
I am using ubuntu and virtualenv.
How can i overcome this issue ?
Thanks
I found solution after reading this thread.
Trick is while running your application pass use_reloader=False.
app.run("0.0.0.0", 5051, debug=True, use_reloader=False)
这篇关于在Eclipse中终止Flask的内部服务器(Aptana Pydev)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!