Verify the database is reachable by acquiring a pooled connection and issuing a ping.
(&self)
| 68 | /// Verify the database is reachable by acquiring a pooled connection |
| 69 | /// and issuing a ping. |
| 70 | pub async fn ping(&self) -> PersistenceResult<()> { |
| 71 | let mut conn = self.pool.acquire().await.map_err(|e| map_db_error(&e))?; |
| 72 | conn.ping().await.map_err(|e| map_db_error(&e)) |
| 73 | } |
| 74 | |
| 75 | /// Test support only: close the underlying connection pool. |
| 76 | /// |
nothing calls this directly
no test coverage detected