I just announced the Gerrit Patch Uploader - https://tools.wmflabs.org/gerrit-patch-uploader/ - on wikitech-l. This is meant for the Tool Labs crowd as a note on how I implemented it.
First of all, I'm using the new web (lighttpd) scheme. To run a Flask application, you need to setup ~/.lighttpd.conf and an fcgi file. The lighttpd conf is available at [1], while the app.fcgi is at [2]. For the lighttpd conf, debug.log-request-handling = "enable" is really useful - it tells you how lighttpd is handling your request. There are some ohter debug options: [3] The app.fcgi activates it's own request logging, which helps to understand how Flask is handling the request. The user identification is handled by OAuth - not really meant for this, but it works, thanks to the 'userinfo' api function. I have published the Flask blueprint for this seperately as flask-mwoauth [4]. Please check demo.py [5] for info on how to use it. If you have any questions on running a Flask app over fcgi on TL, or using oauth-based identification, please let me know. Merlijn [1] https://github.com/valhallasw/gerrit-patch-uploader/blob/master/lighttpd.conf [2] https://github.com/valhallasw/gerrit-patch-uploader/blob/master/app.fcgi [3] http://redmine.lighttpd.net/projects/1/wiki/DebugVariables [4] https://github.com/valhallasw/flask-mwoauth [5] https://github.com/valhallasw/flask-mwoauth/blob/master/demo.py
_______________________________________________ Labs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/labs-l
