Jump to content

Help talk:Toolforge/My first Flask OAuth tool/Archives/2019

From Wikitech
Warning! Please do not post any new comments on this page. This is a discussion archive See current discussion or the archives index.

Developer mode

Hi, is there a possibility to use the advantages of the developer mode on Toolforge? It would be helpful, if Flask would recognize changed files. At the moment, I have to restart the webservice again and again to reflect these changes. Any ideas? --FNDE (talk) 20:40, 14 July 2019 (UTC)Reply

If "developer mode" means https://flask.palletsprojects.com/en/1.1.x/server/, there is not an easy way to do that today with the webservice command. It should be possible to accomplish the flask run method using a custom deployment as described in Help:Toolforge/Kubernetes#Kubernetes_continuous_jobs, but that would be a very advanced thing to add to a "my first X" tutorial. Adding a touch-reload option to a $HOME/www/python/uwsgi.ini config file and then using touch the-path-you-configured to trigger a reload might get close to doing what you want, but I have not tried that personally. See Help:Toolforge/Web#Default_uwsgi_configuration for a bit more info on $HOME/www/python/uwsgi.ini. --BryanDavis (talk) 00:17, 15 July 2019 (UTC)Reply