I am trying to start a new thread in Python inside of a Flask application. I am doing background work that gets triggered by the request, but I don\'t need to wait for the
Since version 0.10 there is a supported way of doing this: http://flask.pocoo.org/docs/api/#flask.copy_current_request_context
If you want the before_request hooks to run you must call current_app.preprocess_request() inside of the decorated function.
before_request
current_app.preprocess_request()