Add public method to determine if v3 is enabled

This commit is contained in:
Damien Elmes 2023-10-25 11:41:05 +10:00
parent 1c08a97fb2
commit 35be9a70da

View File

@ -214,6 +214,10 @@ impl Collection {
.unwrap_or(SchedulerVersion::V1)
}
pub fn v3_enabled(&self) -> bool {
self.scheduler_version() == SchedulerVersion::V2 && self.get_config_bool(BoolKey::Sched2021)
}
/// Caution: this only updates the config setting.
pub(crate) fn set_scheduler_version_config_key(&mut self, ver: SchedulerVersion) -> Result<()> {
self.state.scheduler_info = None;