From c9adcede717f863cf343c35ea4de333e761b256d Mon Sep 17 00:00:00 2001 From: Joel Natividad <1980690+jqnatividad@users.noreply.github.com> Date: Thu, 14 Nov 2024 06:53:54 -0500 Subject: [PATCH] `chore`: `fetch` & `fetchpost` - use redis 0.25 execute API untl we bump redis to 0.27 --- src/cmd/fetch.rs | 8 +++++--- src/cmd/fetchpost.rs | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/cmd/fetch.rs b/src/cmd/fetch.rs index 3cae1e3bd..087b67544 100644 --- a/src/cmd/fetch.rs +++ b/src/cmd/fetch.rs @@ -476,9 +476,11 @@ pub fn run(argv: &[&str]) -> CliResult<()> { } if args.flag_flush_cache { - redis::cmd("FLUSHDB") - .exec(&mut redis_conn) - .map_err(|_| "Cannot flush Redis cache")?; + // TODO: replace deprecated redis::execute once we bump redis to 0.27 + // redis::cmd("FLUSHDB") + // .exec(&mut redis_conn) + // .map_err(|_| "Cannot flush Redis cache")?; + redis::cmd("FLUSHDB").execute(&mut redis_conn); info!("flushed Redis database."); } CacheType::Redis diff --git a/src/cmd/fetchpost.rs b/src/cmd/fetchpost.rs index dc6093108..2e7b58a91 100644 --- a/src/cmd/fetchpost.rs +++ b/src/cmd/fetchpost.rs @@ -433,9 +433,11 @@ pub fn run(argv: &[&str]) -> CliResult<()> { } if args.flag_flush_cache { - redis::cmd("FLUSHDB") - .exec(&mut redis_conn) - .map_err(|_| "Cannot flush Redis cache")?; + // TODO: replace deprecated redis::execute once we bump redis to 0.27 + // redis::cmd("FLUSHDB") + // .exec(&mut redis_conn) + // .map_err(|_| "Cannot flush Redis cache")?; + redis::cmd("FLUSHDB").execute(&mut redis_conn); info!("flushed Redis database."); } CacheType::Redis