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

expose base redis lib #32

Merged
merged 1 commit into from
Nov 14, 2023
Merged

expose base redis lib #32

merged 1 commit into from
Nov 14, 2023

Conversation

kaplanelad
Copy link
Contributor

@kaplanelad kaplanelad commented Nov 14, 2023

This pull request enhances the redis_rs library by enabling the utilization of a specified Redis version. This is achieved by allowing additional commands to be executed before registration. For instance, one can use the 'flushall' command as an example of a pre-registration command.

For example, I want to run this logic before registering:

    if let Some(pool) = &redis {
        let mut conn = pool.get().await.unwrap();
        sidekiq::redis_rs::cmd("FLUSHDB")
            .query_async::<_, ()>(conn.unnamespaced_borrow_mut())
            .await
            .unwrap();
    }

@film42
Copy link
Owner

film42 commented Nov 14, 2023

Good idea! Thanks!

@film42 film42 merged commit 5e16756 into film42:master Nov 14, 2023
1 check passed
@film42
Copy link
Owner

film42 commented Nov 14, 2023

Released with 0.8.1

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.

2 participants