Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

问个题外话,有没有好的方法实现在WSGI模式下在页面里控制tornado的重载? #4

Closed
ghost opened this issue Apr 20, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 20, 2015

我这里有一个小的框架用于自己的项目,有时候会遇到修改url,同时对应进行访问控制,这个时候我需要重载tornado,如果用ioloop,可以使用autoreload,不过在bae等使用WSGI的场合就行不同了,不知道没有什么好办法?

@mqingyn
Copy link
Owner

mqingyn commented Apr 21, 2015

没有遇到过这样的需求呀。通常不会在生产环境去开启autoreload的,一般部署都是直接用进程管理工具去操作服务进程。

@ghost
Copy link
Author

ghost commented Apr 21, 2015

我这边的场景是这样的,是用在一个涉及到仓库管理的项目,每个仓库可以单独管理,单独设置不同用户组在不同仓库的权限。在添加新的仓库后,会生成对应的url和对应的基础用户组的权限,这个时候就需要重载了,编辑和删除仓库的时候也需要重载。我想在页面里实现手工控制或者在必要的情况下才重载。

@mqingyn
Copy link
Owner

mqingyn commented Apr 22, 2015

新生成的url最好通过一个通用的路由handler去捕捉和处理,遇到特定的路由规则去import特定的模块,不要用reload的方式。

@mqingyn mqingyn closed this as completed Dec 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant