Skip to content

Commit

Permalink
chore: fetch & fetchpost - use redis 0.25 execute API untl we b…
Browse files Browse the repository at this point in the history
…ump redis to 0.27
  • Loading branch information
jqnatividad committed Nov 14, 2024
1 parent cb8c621 commit c9adced
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/cmd/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions src/cmd/fetchpost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c9adced

Please sign in to comment.