Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Commit

Permalink
FIX: «fred-xxx: Changing client name from fred-xxx to rusty-tractive»
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenein committed Jul 27, 2022
1 parent 0c8b5fd commit b8046d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rusty-shared-redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ edition = "2021"
[dependencies]
anyhow = "1.0.57"
async-std = { version = "1.11.0", default-features = false }
fred = { version = "5.1.0", default-features = false, features = ["partial-tracing", "no-client-setname"] }
fred = { version = "5.1.0", default-features = false, features = ["partial-tracing"] }
tracing = "0.1.34"
5 changes: 3 additions & 2 deletions rusty-shared-redis/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use anyhow::{Context, Result};
use async_std::future::timeout;
use fred::pool::RedisPool;
use fred::prelude::*;
use fred::types::{MultipleKeys, MultipleValues, PerformanceConfig, RedisKey};
use fred::types::{CustomCommand, MultipleKeys, MultipleValues, PerformanceConfig, RedisKey};
use tracing::{debug, instrument};

pub struct Redis {
Expand Down Expand Up @@ -40,7 +40,8 @@ impl Redis {

let pool = RedisPool::new(config, 2)?;
connect(&pool).await?;
pool.client_setname(client_name).await?;
pool.custom(CustomCommand::new_static("CLIENT SETNAME", None, true), vec![client_name])
.await?;
let script_hashes = load_scripts(&pool).await?;

Ok(Self {
Expand Down

0 comments on commit b8046d6

Please sign in to comment.