mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 04:04:55 +08:00
refactor(tenant): use tenant id type (#6643)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3,6 +3,7 @@ use std::{
|
||||
sync::{atomic, Arc},
|
||||
};
|
||||
|
||||
use common_utils::id_type;
|
||||
use router_env::tracing::Instrument;
|
||||
use tokio::{
|
||||
sync::{mpsc, oneshot},
|
||||
@ -34,12 +35,15 @@ pub struct HandlerInner {
|
||||
loop_interval: Duration,
|
||||
active_tasks: Arc<atomic::AtomicU64>,
|
||||
conf: DrainerSettings,
|
||||
stores: HashMap<String, Arc<Store>>,
|
||||
stores: HashMap<id_type::TenantId, Arc<Store>>,
|
||||
running: Arc<atomic::AtomicBool>,
|
||||
}
|
||||
|
||||
impl Handler {
|
||||
pub fn from_conf(conf: DrainerSettings, stores: HashMap<String, Arc<Store>>) -> Self {
|
||||
pub fn from_conf(
|
||||
conf: DrainerSettings,
|
||||
stores: HashMap<id_type::TenantId, Arc<Store>>,
|
||||
) -> Self {
|
||||
let shutdown_interval = Duration::from_millis(conf.shutdown_interval.into());
|
||||
let loop_interval = Duration::from_millis(conf.loop_interval.into());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user