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

Cjus/improve redis client #2054

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Cjus/improve redis client #2054

wants to merge 6 commits into from

Conversation

cjus
Copy link
Collaborator

@cjus cjus commented Feb 21, 2025

This pull request introduces several enhancements and fixes to the Redis client in the framework-cli application. The most important changes include the addition of a connection manager, a connection monitor, and various improvements to error handling and logging.

Enhancements to Redis Client:

  • Added connection-manager feature to redis dependency in Cargo.toml to utilize the connection manager for better connection handling.
  • Introduced ConnectionManager for managing Redis connections, replacing the previous manual connection handling. [1] [2]
  • Implemented a connection monitor that periodically checks the connection state and attempts to reconnect if the connection is lost. [1] [2] [3]

Improvements to Error Handling and Logging:

  • Enhanced error messages in the Redis client to include <RedisClient> for better log filtering and readability. [1] [2] [3] [4]
  • Improved logging for periodic tasks and connection state changes to provide more detailed insights. [1] [2]

Codebase Simplification:

  • Refactored the setup_redis_client function to spawn the connection monitor task. [1] [2]
  • Updated the RedisClient struct to include an AtomicBool for tracking connection state. [1] [2]

Dependency Updates:

  • Added futures::FutureExt to handle future extensions and redis::aio::ConnectionManager for managing asynchronous Redis connections.

These changes collectively improve the reliability and maintainability of the Redis client by leveraging the connection manager, enhancing error handling, and providing better logging.

Copy link

vercel bot commented Feb 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
framework-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 9:07pm
framework-landing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 9:07pm
moose-logs-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 9:07pm
moose-product-analytics ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 21, 2025 9:07pm

okane16 and others added 2 commits February 21, 2025 14:04
* updated python starter code

* streaming docs

* first draft scripts

* ingest

* fix imports

* fix python/ts distinctions

* remove params

* clean up

* trigger via moose API make python only

* workflows cron update

* pydantic

* quickstart fix

* starter code for ts and python

* update e2e tests

* data passing ts, fix python MV

* chris ingest feedback

* chris feedback + workflow ingest

* workflow ts syntax fix

---------

Co-authored-by: Jonathan Widjaja <[email protected]>
@callicles
Copy link
Collaborator

Did you rebase? it looks like some commits in here are duplicate to what's in main?

@callicles
Copy link
Collaborator

Would be nice if you could clean that up - it makes the diff dirty and harder to review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants