Flask + mod_wsgi automatic reload on source code change

前端 未结 6 848
旧时难觅i
旧时难觅i 2021-01-04 08:10

Does anyone know how to make a mod_wsgi automatically reload a Flask app when any of the modules changes? I\'ve tried WSGIScriptReloading On, but n

6条回答
  •  既然无缘
    2021-01-04 08:43

    What do you mean 'the official documentation is kind of a bear'? What is wrong with the included recipe:

    • http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode#Monitoring_For_Code_Changes

    That document also explains why WSGIScriptReloading doesn't do what you expect.

    And no it is not possible to permanently crash on syntax errors. It is embedded in Apache and the whole point of Apache is to keep stuff running.

    Sounds like you should not be using Apache/mod_wsgi for development. Everyones knows one should not use automatic source code reloading in production so can't imagine you would want to do that.

提交回复
热议问题