mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-11 12:17:53 +02:00
Add sync support for the AsyncPostgresStore (#2673)
This commit is contained in:
@@ -12621,9 +12621,19 @@ async def test_store_injected_async(checkpointer_name: str, store_name: str) ->
|
||||
)
|
||||
return {"count": 1}
|
||||
|
||||
def other_node(inputs: State, config: RunnableConfig, store: BaseStore):
|
||||
assert isinstance(store, BaseStore)
|
||||
store.put(("not", "interesting"), "key", {"val": "val"})
|
||||
item = store.get(("not", "interesting"), "key")
|
||||
assert item is not None
|
||||
assert item.value == {"val": "val"}
|
||||
return {"count": 0}
|
||||
|
||||
builder = StateGraph(State)
|
||||
builder.add_node("node", Node())
|
||||
builder.add_node("other_node", other_node)
|
||||
builder.add_edge("__start__", "node")
|
||||
builder.add_edge("node", "other_node")
|
||||
|
||||
N = 500
|
||||
M = 1
|
||||
|
||||
Reference in New Issue
Block a user