canic_core/ops/model/
mod.rs1pub mod memory;
2
3use crate::{
4 Error, ThisError,
5 ops::{OpsError, model::memory::MemoryOpsError},
6};
7use std::time::Duration;
8
9pub const OPS_INIT_DELAY: Duration = Duration::from_secs(10);
11
12pub const OPS_CYCLE_TRACK_INTERVAL: Duration = Duration::from_secs(60 * 10);
14
15pub const OPS_LOG_RETENTION_INTERVAL: Duration = Duration::from_secs(60 * 10);
17
18pub const OPS_RESERVE_INIT_DELAY: Duration = Duration::from_secs(30);
20
21pub const OPS_RESERVE_CHECK_INTERVAL: Duration = Duration::from_secs(30 * 60);
23
24#[derive(Debug, ThisError)]
30pub enum ModelOpsError {
31 #[error(transparent)]
32 MemoryOpsError(#[from] MemoryOpsError),
33}
34
35impl From<ModelOpsError> for Error {
36 fn from(err: ModelOpsError) -> Self {
37 OpsError::ModelOpsError(err).into()
38 }
39}