Compare commits

...

2 commits

Author SHA1 Message Date
a067515b25
fix: clap-verbosity-flag dependency 2025-01-09 18:24:58 +04:00
fd25b49cff
fix: update for latest fred 2025-01-09 18:22:39 +04:00
5 changed files with 18 additions and 9 deletions

11
Cargo.lock generated
View file

@ -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",

View file

@ -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"

View file

@ -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!()
}

View file

@ -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;

View file

@ -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);