feat(core): add support for api locking with multiple keys for a single api (#8887)

This commit is contained in:
Hrithikesh
2025-08-13 13:13:15 +05:30
committed by GitHub
parent 5a09d7ec2a
commit 2f7cd4f752
5 changed files with 663 additions and 18 deletions

View File

@ -24,7 +24,11 @@ use std::sync::{atomic, Arc};
use common_utils::errors::CustomResult;
use error_stack::ResultExt;
pub use fred::interfaces::PubsubInterface;
use fred::{interfaces::ClientLike, prelude::EventInterface};
use fred::{
clients::Transaction,
interfaces::ClientLike,
prelude::{EventInterface, TransactionInterface},
};
pub use self::types::*;
@ -223,6 +227,10 @@ impl RedisConnectionPool {
})
});
}
pub fn get_transaction(&self) -> Transaction {
self.pool.next().multi()
}
}
pub struct RedisConfig {