reorg statusdb
This commit is contained in:
parent
a066329730
commit
1b44ec4f4c
1 changed files with 5 additions and 4 deletions
|
@ -180,7 +180,8 @@ pub struct Routine {}
|
|||
|
||||
pub struct ModulesManager {
|
||||
// statusdb: Arc<RwLock<HashMap<ModType, Vec<ModStatusType>>>>,
|
||||
statusdb: Arc<RwLock<HashMap<(ModType,ModGroup), Vec<StatusType>>>>,
|
||||
// statusdb: Arc<RwLock<HashMap<(ModType,ModGroup), Vec<StatusType>>>>,
|
||||
statusdb: Arc<RwLock<HashMap<ModType, (ModGroup, Vec<StatusType>)>>>,
|
||||
pub botactions: Arc<RwLock<HashMap<ModType, Vec<BotAction>>>>,
|
||||
}
|
||||
|
||||
|
@ -374,11 +375,11 @@ impl ModulesManager {
|
|||
|
||||
let mut dbt = self.statusdb.write().await;
|
||||
//
|
||||
let statusvector = dbt.entry((in_module.clone(),in_modgroup.clone())).or_insert(Vec::new());
|
||||
let statusvector = dbt.entry(in_module.clone()).or_insert((in_modgroup.clone(),Vec::new()));
|
||||
|
||||
match in_modgroup {
|
||||
ModGroup::Core => statusvector.push(StatusType::Enabled(StatusLvl::Instance)) , // Pushes the Module as Enabled at Instance Level
|
||||
ModGroup::Custom => statusvector.push(StatusType::Disabled(StatusLvl::Instance)),
|
||||
ModGroup::Core => statusvector.1.push(StatusType::Enabled(StatusLvl::Instance)) , // Pushes the Module as Enabled at Instance Level
|
||||
ModGroup::Custom => statusvector.1.push(StatusType::Disabled(StatusLvl::Instance)),
|
||||
}
|
||||
|
||||
// statusvector.push(ModStatusType::Enabled(StatusLvl::Instance)); // Pushes the Module as Enabled at Instance Level
|
||||
|
|
Loading…
Reference in a new issue