feat: add GenericNotFoundError error response and set_key_if_not_exists_with_expiry Redis command (#1526)

This commit is contained in:
Prajjwal Kumar
2023-07-03 18:21:23 +05:30
committed by GitHub
parent 1e87f3d673
commit 9a88a32d50
5 changed files with 22 additions and 6 deletions

View File

@ -16,7 +16,7 @@ pub async fn is_stream_available(stream_index: u8, store: Arc<services::Store>)
match store
.redis_conn
.set_key_if_not_exist(stream_key_flag.as_str(), true)
.set_key_if_not_exists_with_expiry(stream_key_flag.as_str(), true, None)
.await
{
Ok(resp) => resp == redis::types::SetnxReply::KeySet,