New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an API to allow passing objects to middleware #120
Comments
Flask integration sounds like a great addition and natural progression. 👏 If I understand correctly though, the real problem to solve here would be adding extra data to the One solution that came to mind, and I'm not sure how elegant it is, would be to add Another way to solve this issue would be to add I was looking at how Celery does it, and to be honest its not pretty. These are some thoughts on this, and perhaps someone else has a better solution. |
|
@andrewgy8 yea that's exactly the usecase. I think passing kwargs + config to setup function is probably the cleanest. @tobami, unfortunately not as |
Closing as it was addressed in #123 and will be in the next release. |
I'm adding rele to flask app, and the subscription callbacks need the flask app_context. I've done this by way of middleware:
eg:
But to make this reusable across our services and other flask apps, I'd need a way to add arbitrary data to the config that is passed to middleware.setup method or have an easy way to call custom middleware functions.
eg:
The text was updated successfully, but these errors were encountered: