(name: &str)
| 166 | } |
| 167 | |
| 168 | pub async fn get_state(name: &str) -> Result<String> { |
| 169 | let key = redis_key(format!("metrics:{{{}}}", name)); |
| 170 | |
| 171 | let v: Option<String> = redis::cmd("GET") |
| 172 | .arg(key) |
| 173 | .query_async(&mut get_async_redis_conn().await?) |
| 174 | .await?; |
| 175 | Ok(v.unwrap_or_default()) |
| 176 | } |
| 177 | |
| 178 | pub async fn get( |
| 179 | name: &str, |
no test coverage detected