Fallback for Postgresql DB in AsyncSession #1463
Unanswered
junoriosity
asked this question in
Questions
Replies: 2 comments
|
This is not about SQLModel actually but SQLAlchemy, your example also literally only imports sqlalchemy libs. Maybe you'll have better luck asking there or in StackOverflow with sqlalchemy tag. Am also interested in the answer though :) |
0 replies
I have tried to use asyncSession which import from sqlalchemy, and then the problem solved. I hope it is useful |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
First Check
Commit to Help
Example Code
Description
I am currently having two Postgresql Clusters attached to my Python FastAPI server (see the source code).
Now assume, that the replica crashes. What would be the best strategy to redirect the traffic back to the primary?
I currently have tried this:
However, it used to throw Runtime errors? Hence, it would be great if you could give me some thoughts about it.
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.8
Python Version
3.10
Additional Context
No response
All reactions