From fd25b49cff543bb94dbf7c919d97be371503eb09 Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 9 Jan 2025 18:22:39 +0400 Subject: [PATCH 1/2] fix: update for latest fred --- src/ingest_socket_server/mod.rs | 4 ++-- src/main.rs | 9 +++------ src/web_server/mod.rs | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/ingest_socket_server/mod.rs b/src/ingest_socket_server/mod.rs index cb607d5..b93a9c8 100644 --- a/src/ingest_socket_server/mod.rs +++ b/src/ingest_socket_server/mod.rs @@ -11,10 +11,10 @@ // } // } -use fred::prelude::RedisClient; +use fred::prelude::Client; use crate::cli::{Cli, SocketServerArgs}; -pub async fn socketserv_main(args: Cli, specific_args: SocketServerArgs, client: RedisClient) { +pub async fn socketserv_main(args: Cli, specific_args: SocketServerArgs, client: Client) { todo!() } diff --git a/src/main.rs b/src/main.rs index e739f91..26a4243 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,12 +9,9 @@ mod web_server; use clap::Parser; use cli::{Cli, MyCommand}; -use fred::{ - clients::RedisClient, - prelude::ClientLike, - types::{ - ConnectionConfig, PerformanceConfig, ReconnectPolicy, RedisConfig, Server, ServerConfig, - }, +use fred::prelude::{ + Client as RedisClient, ClientLike, Config as RedisConfig, ConnectionConfig, PerformanceConfig, + ReconnectPolicy, Server, ServerConfig, }; use ingest_socket_server::socketserv_main; diff --git a/src/web_server/mod.rs b/src/web_server/mod.rs index 35823f9..75149b9 100644 --- a/src/web_server/mod.rs +++ b/src/web_server/mod.rs @@ -28,7 +28,7 @@ use crate::Cli; use ntex::web; pub async fn server_main(args: Cli, specific_args: WebServerArgs, client: RedisClient) { - let asd: Str = client.ping().await.unwrap(); + let asd: Str = client.ping(None).await.unwrap(); println!("Ping result: {}", asd); From a067515b2555c72711e897a946645d7ff8d1b1de Mon Sep 17 00:00:00 2001 From: DarkCat09 Date: Thu, 9 Jan 2025 18:24:58 +0400 Subject: [PATCH 2/2] fix: clap-verbosity-flag dependency --- Cargo.lock | 11 +++++++++++ Cargo.toml | 1 + 2 files changed, 12 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 26a518f..eb37b9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,6 +345,16 @@ dependencies = [ "clap_derive", ] +[[package]] +name = "clap-verbosity-flag" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2678fade3b77aa3a8ff3aae87e9c008d3fb00473a41c71fbf74e91c8c7b37e84" +dependencies = [ + "clap", + "log", +] + [[package]] name = "clap_builder" version = "4.5.24" @@ -1075,6 +1085,7 @@ dependencies = [ "bytes 1.9.0", "chrono", "clap", + "clap-verbosity-flag", "dotenvy", "fred", "futures-util", diff --git a/Cargo.toml b/Cargo.toml index 9f8e941..d571bc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,3 +31,4 @@ tokio = { version = "1.28.2", features = ["full"] } ufmt = { version = "0.2.0", features = ["std"] } futures-util = { version = "0.3.30", features = ["tokio-io"] } snafu = "0.8.5" +clap-verbosity-flag = "3.0.2"