I have a flask-script command that spawns a long sequence of greenlets. The problem is, these greenlets are unable to access my app context. I get a "> failed with RuntimeError" at all times (accessing app.logger, per example). Suggestions?
On of my attempts: spawn(method, app, arg1, arg2)
def spawn(app, arg1, arg2):
with app.app_context():
app.logger.debug('bla bla') # doesn't work
... do stuff