john-bodley opened a new pull request #4669: [sqllab] Using app context for processing Jinja template in async mode URL: https://github.com/apache/incubator-superset/pull/4669 We're running the Celery workers via ``` celery worker --app=superset.sql_lab:celery_app ``` rather than ``` superset worker ``` which throws a `RuntimeError: Working outside of application context.` when trying to use templates of the form `'{{ presto.latest_partition("schema.table") }}'` which doesn't have access to the Flask `g` variable which is used to determine whether the user has access to said table. Note I'm not certain what logic should reside in Celery and what should be pre-computed on the Flask server, but this PR simply enforces that the template processing occurs within an application context. to: @michellethomas @mistercrunch @timifasubaa
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
