V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
myyou
V2EX  ›  Python

supervisor 能支持代码自动重载吗?

  •  
  •   myyou · 2016-03-05 15:06:20 +08:00 · 3436 次点击
    这是一个创建于 3000 天前的主题,其中的信息可能已经有所发展或是发生改变。

    用 supervisor 代理了 python flask 项目,我想在 web 运行的状态下修改代码后,能立即自动重载(就是热修改),而不需要运行命令: supervisorctl restart app ,去重启。请问有什么办法吗?

    6 条回复    2016-03-05 23:30:32 +08:00
    Strikeactor
        1
    Strikeactor  
       2016-03-05 15:08:09 +08:00
    inotify 钩子
    microhan
        2
    microhan  
       2016-03-05 15:19:10 +08:00
    @Strikeactor 您好,我也想知道 inotify 怎么用,还望不吝赐教。
    allan888
        3
    allan888  
       2016-03-05 15:31:40 +08:00
    flask 那边 run 里面加上 debug=true 不就可以自己检测文件变化吗?
    Strikeactor
        4
    Strikeactor  
       2016-03-05 15:40:39 +08:00
    microhan
        5
    microhan  
       2016-03-05 15:48:25 +08:00
    @Strikeactor 谢谢分享。
    julyclyde
        6
    julyclyde  
       2016-03-05 23:30:32 +08:00
    @allan888 影响速度
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2487 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 15:15 · PVG 23:15 · LAX 08:15 · JFK 11:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.