langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, LLM and vector store agnostic.
http://www.langflow.org
MIT License
18.48k stars 2.77k forks source link

ERR by redis : RedisCache.upsert() got an unexpected keyword argument 'lock' #1909

Open songjinu opened 2 weeks ago

songjinu commented 2 weeks ago

Describe the bug I got a error when use redis cache.

RedisCache.upsert() got an unexpected keyword argument 'lock' I setted env : LANGFLOW_CACHE_TYPE= redis

Error checking build status: RedisCache.upsert() got an unexpected keyword argument 'lock'
dosubot[bot] commented 2 weeks ago

The issue you're experiencing with the RedisCache.upsert() method not accepting a lock argument is due to the method's implementation in the RedisCache class, which indeed does not support a lock parameter. This contrasts with the implementations in other cache classes that might accept such an argument.

To resolve this error, you should remove the lock keyword argument from your call to the upsert method when using RedisCache. This adjustment will align your usage with the expected method signature and functionality, effectively eliminating the error.

For reference, the upsert method in RedisCache is designed to insert or update a value in the cache, with special handling for merging dictionaries if both the existing and new values are dictionaries. It does not include or require a lock parameter for its operation.

#### Details **Sources** - [src/backend/base/langflow/services/cache/service.py](https://github.com/logspace-ai/langflow/blob/dev/src/backend/base/langflow/services/cache/service.py) - [.env.example](https://github.com/langflow-ai/langflow/blob/dev/.env.example)
**About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.