Closed jneves closed 5 months ago
Did you ever find a workaround to this? I'm struggling on my end, and using with current_app.app_context()
does not allow it
Hi there! Unfortunately, this Issue has not seen any activity for at least 90 days. If the Issue is still relevant to the latest version of Zappa, please comment within the next 10 days if you wish to keep it open. Otherwise, it will be automatically closed.
Hi there! Unfortunately, this Issue was automatically closed as it had not seen any activity in at least 100 days. If the Issue is still relevant to the latest version of Zappa, please open a new Issue.
Originally from: https://github.com/Miserlou/Zappa/issues/1958 by joshpurvis
Context
When using a
create_app()
pattern with flask,zappa.async.task
decorated functions aren't able to access the app context. I sort of understand why they can't accesscurrent_app
, as that's just a proxy, but can't figure out how to workaround it.Expected Behavior
Expect to be able to access
current_app.config
itemsActual Behavior
Possible Fix
Steps to Reproduce
myapp.py
run.py
Your Environment
Zappa: 0.48.2 Python: 3.6.9 (via virtualenv)