khive_runtime/runtime/
events_disk_policy.rs1use super::*;
4
5impl KhiveRuntime {
6 pub fn events_disk_guard_policy(&self) -> RuntimeResult<khive_db::EffectiveDiskGuardConfig> {
8 let pool = self.core_backend.as_ref().unwrap_or(&self.backend).pool();
9 pool.effective_disk_guard_config()
10 .map(Ok)
11 .unwrap_or_else(|| {
12 self.config
13 .disk_guard_environment
14 .resolve(None, None)
15 .map_err(Into::into)
16 })
17 }
18
19 pub fn events_volume_lock_dir(&self) -> Option<std::path::PathBuf> {
22 self.core_backend
23 .as_ref()
24 .unwrap_or(&self.backend)
25 .pool()
26 .config()
27 .volume_lock_dir
28 .clone()
29 .or_else(|| self.config.volume_lock_dir.clone())
30 }
31}