Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix async cache #4265

Merged
merged 2 commits into from
Oct 26, 2024
Merged

fix: Fix async cache #4265

merged 2 commits into from
Oct 26, 2024

Conversation

cbornet
Copy link
Collaborator

@cbornet cbornet commented Oct 24, 2024

  • Replace the sync __contains__ by the async contains() in AsyncBaseCacheService
  • Refactor ChatService
  • Fix ChatService to call CacheService blocking methods in threads
  • Fix SocketService to await on result when the cache is async.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 24, 2024
@dosubot dosubot bot added the bug Something isn't working label Oct 24, 2024
@github-actions github-actions bot added bug Something isn't working and removed bug Something isn't working labels Oct 24, 2024
@cbornet
Copy link
Collaborator Author

cbornet commented Oct 24, 2024

Note: as all the usages of the cache_service are done in coroutines, maybe we could have CacheServiceFactory return only AsyncBaseCacheService (making memory setting return AsyncInMemoryCache) ?

Copy link
Contributor

@ogabrielluiz ogabrielluiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 25, 2024
@cbornet cbornet enabled auto-merge (squash) October 26, 2024 08:24
@cbornet cbornet merged commit 3131c0c into langflow-ai:main Oct 26, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants