Is it okay to keep an async checkpointer as singleton? #4720
Unanswered
nimishdm-airindia
asked this question in
Q&A
Replies: 0 comments
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.
-
I'm using FastAPI with AsyncMongoDBSaver. I keep the checkpointer in a global variable and dispose it only when the lifetime of the FastAPI app ends. I guess this means the async mongo client will get closed only when the lifetime ends. Is this the right way to do it?
For context, this is the code for AsyncMongoDBSaver.from_conn_string(DB_URI) from the langgraph.checkpoint.mongodb.aio library.
Beta Was this translation helpful? Give feedback.
All reactions