Skip to content

Commit

Permalink
Fix redis healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
p1gp1g committed Jan 16, 2025
1 parent 73ef3c7 commit f82bc8a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
17 changes: 3 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion autopush-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ grpcio = { version = "=0.13.0", features = ["openssl"], optional = true }
grpcio-sys = { version = "=0.13.0", optional = true }
protobuf = { version = "=2.28.0", optional = true } # grpcio does not support protobuf 3+
form_urlencoded = { version = "1.2", optional = true }
redis = { version = "0.27.6", features = ["aio", "tokio-comp"]}
redis = { version = "0.28.1", features = ["aio", "tokio-comp"]}

[dev-dependencies]
mockito = "0.31"
Expand Down
3 changes: 2 additions & 1 deletion autopush-common/src/db/redis/redis_client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ impl DbClient for RedisClientImpl {
}

async fn health_check(&self) -> DbResult<bool> {
let _ = self.connection().await?;
let mut con = self.connection().await?;
let _: () = con.ping().await?;
Ok(true)
}

Expand Down

0 comments on commit f82bc8a

Please sign in to comment.