🐛 fix(process.py): remove unnecessary else statement to improve code readability and semantics

🐛 fix(process.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(worker.py): update session_manager.update_session() method signature to match the new implementation
🐛 fix(test_process.py): update session_manager.build_key() and session_manager.clear_session() method calls to match the new implementation
This commit is contained in:
Gabriel Luiz Freitas Almeida 2023-09-05 14:46:55 -03:00
commit 5903378503
3 changed files with 6 additions and 11 deletions

View file

@ -217,14 +217,15 @@ def test_load_langchain_object_with_no_cached_session(client, basic_graph_data):
# Provide a non-existent session_id
session_manager = get_session_manager()
session_id1 = "non-existent-session-id"
session_id = session_manager.build_key(session_id1, basic_graph_data)
langchain_object1, artifacts1 = session_manager.load_session(
session_id1, basic_graph_data
session_id, basic_graph_data
)
# Clear the cache
session_manager.clear_session(session_id1, basic_graph_data)
session_manager.clear_session(session_id)
# Use the new session_id to get the langchain_object again
langchain_object2, artifacts2 = session_manager.load_session(
session_id1, basic_graph_data
session_id, basic_graph_data
)
assert id(langchain_object1) != id(