在Eclipse中终止Flask的内部服务器(Aptana Pydev) [英] Terminating Flask's Internal Server in Eclipse ( Aptana Pydev)

查看:361
本文介绍了在Eclipse中终止Flask的内部服务器(Aptana Pydev)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在月食Luna中使用Aptana插件。 Pydev已经在Aptana中了。

我正在使用flask的内部web服务器(Werkzeug / 0.10.1 Python / 2.7.6)来开发瓶子。



当我运行我的项目时一切顺利,但是当我终止运行时,我的应用程序服务器保持活动状态。


socket.error:[Errno 98]已经在使用的地址


以前我用的是没有aptana的pydev,工作正常。现在对于每一个运行我手动杀死过程,这是非常恼人的。

我使用的是Ubuntu和virtualenv。



我怎样才能克服这个问题?

谢谢 解决方案

=https://stackoverflow.com/questions/9449101/how-to-stop-flask-from-initialising-twice-in-debug-mode>线程



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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆