V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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 · Mar 5, 2016 · 4087 views
    This topic created in 3709 days ago, the information mentioned may be changed or developed.

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

    6 replies    2016-03-05 23:30:32 +08:00
    Strikeactor
        1
    Strikeactor  
       Mar 5, 2016
    inotify 钩子
    microhan
        2
    microhan  
       Mar 5, 2016
    @Strikeactor 您好,我也想知道 inotify 怎么用,还望不吝赐教。
    allan888
        3
    allan888  
       Mar 5, 2016
    flask 那边 run 里面加上 debug=true 不就可以自己检测文件变化吗?
    Strikeactor
        4
    Strikeactor  
       Mar 5, 2016
    microhan
        5
    microhan  
       Mar 5, 2016
    @Strikeactor 谢谢分享。
    julyclyde
        6
    julyclyde  
       Mar 5, 2016
    @allan888 影响速度
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2417 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 11:07 · PVG 19:07 · LAX 04:07 · JFK 07:07
    ♥ Do have faith in what you're doing.