Skip to content
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

Versioning causes FastAPI-Redis plugin to malfunction #56

Open
fusion44 opened this issue Sep 6, 2021 · 0 comments
Open

Versioning causes FastAPI-Redis plugin to malfunction #56

fusion44 opened this issue Sep 6, 2021 · 0 comments

Comments

@fusion44
Copy link

fusion44 commented Sep 6, 2021

Describe the bug
As soon as I activate VersionedFastAPI the Redis plugin throws an error in depends_redis() function. Seems like Redis is not properly initialized. The Redis object simply is not there when depends_redis wants to return it. The startup function is called normally and the Redis object is initialized but in a different version of the FastAPI app that is not used in versioned routes. I've added more comments to the gist posted below.

To Reproduce
Here's a minimal code snipped to reproduce the problem:
https://gist.github.com/fusion44/8b9867e13a03edf29388f6b9c9e4b8ca

Expected behavior
Redis to be available on any depends call.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant