From b8046d6d04b77d0a485cdb45509e3c23f18de04e Mon Sep 17 00:00:00 2001 From: Pavel Perestoronin Date: Wed, 27 Jul 2022 22:57:29 +0200 Subject: [PATCH] =?UTF-8?q?FIX:=20=C2=ABfred-xxx:=20Changing=20client=20na?= =?UTF-8?q?me=20from=20fred-xxx=20to=20rusty-tractive=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rusty-shared-redis/Cargo.toml | 2 +- rusty-shared-redis/src/lib.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rusty-shared-redis/Cargo.toml b/rusty-shared-redis/Cargo.toml index 09c952e..603e87a 100644 --- a/rusty-shared-redis/Cargo.toml +++ b/rusty-shared-redis/Cargo.toml @@ -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" diff --git a/rusty-shared-redis/src/lib.rs b/rusty-shared-redis/src/lib.rs index e86a6a8..cb4e005 100644 --- a/rusty-shared-redis/src/lib.rs +++ b/rusty-shared-redis/src/lib.rs @@ -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 { @@ -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 {