diff --git a/crates/redis_interface/src/commands.rs b/crates/redis_interface/src/commands.rs index 98027c1844..53e1b95088 100644 --- a/crates/redis_interface/src/commands.rs +++ b/crates/redis_interface/src/commands.rs @@ -70,6 +70,18 @@ impl super::RedisConnectionPool { .change_context(errors::RedisError::GetFailed) } + #[instrument(level = "DEBUG", skip(self))] + pub async fn exists(&self, key: &str) -> CustomResult + where + V: Into + Unpin + Send + 'static, + { + self.pool + .exists(key) + .await + .into_report() + .change_context(errors::RedisError::GetFailed) + } + #[instrument(level = "DEBUG", skip(self))] pub async fn get_and_deserialize_key( &self, @@ -149,6 +161,18 @@ impl super::RedisConnectionPool { .change_context(errors::RedisError::SetExpiryFailed) } + #[instrument(level = "DEBUG", skip(self))] + pub async fn set_expire_at( + &self, + key: &str, + timestamp: i64, + ) -> CustomResult<(), errors::RedisError> { + self.pool + .expire_at(key, timestamp) + .await + .into_report() + .change_context(errors::RedisError::SetExpiryFailed) + } #[instrument(level = "DEBUG", skip(self))] pub async fn stream_append_entry( &self,