Pydev中的Django产生多个进程? [英] Django in Pydev spawns multiple processes?

查看:153
本文介绍了Pydev中的Django产生多个进程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中的PyDev中设置了我的项目。每当我调试我的项目,事情都会很好,但是一旦我尝试重新启动Django服务器,它会产生一个额外的runserver进程,阻止我用于服务器的端口( 8000 )。有没有一个解决方法,以确保它真的杀死了服务器?

解决方案

Django每次更改任何Python时重新加载服务器代码(运行服务器的另一个实例并杀死旧的)。似乎从Pydev启动时它的处理不当。您可以通过在服务器启动命令中添加 - noreload 参数来停用此功能。



更多信息: --noreload pydev / django (查找下面的注释,以运行/调试为Django )


I have my project setup in PyDev in Eclipse. Whenever I debug my project, things go great, but once I try to restart the Django server, it spawns an additional runserver process, blocking up the port I'm using for the server (8000). Is there a workaround to make sure it really kills the server?

解决方案

Django reloads the server each time changes are made to any Python code (running another instance of the server and killing the old one). It seems that it's not handled properly when launched from Pydev. You can deactivate this by adding the --noreload argument to the server starting command.

More information: --noreload, pydev/django (look for the remark below Run/Debug as Django)

这篇关于Pydev中的Django产生多个进程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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