canic-core 0.26.0

Canic — a canister orchestration and management toolkit for the Internet Computer
Documentation
use crate::{InternalError, ops::config::ConfigOps};
use std::time::Duration;

///
/// Workflow scheduling constants.
///

/// Shared initial delay for workflow timers to allow init work to settle.
pub const WORKFLOW_INIT_DELAY: Duration = Duration::from_secs(10);

/// Shared cadence for cycle tracking (60 minutes).
pub const WORKFLOW_CYCLE_TRACK_INTERVAL: Duration = Duration::from_secs(60 * 60);

/// Shared cadence for log retention (10 minutes).
pub const WORKFLOW_LOG_RETENTION_INTERVAL: Duration = Duration::from_secs(60 * 10);

/// Shared cadence for intent cleanup (1 hour).
pub const WORKFLOW_INTENT_CLEANUP_INTERVAL: Duration = Duration::from_secs(60 * 60);

/// Shared cadence for attestation key refresh (10 minutes).
pub const WORKFLOW_ATTESTATION_KEY_REFRESH_INTERVAL: Duration = Duration::from_secs(60 * 10);

/// Pool timer initial delay (30 seconds) before first check.
pub const WORKFLOW_POOL_INIT_DELAY: Duration = Duration::from_secs(30);

/// Pool check cadence (30 minutes).
pub const WORKFLOW_POOL_CHECK_INTERVAL: Duration = Duration::from_secs(30 * 60);

///
/// ConfigWorkflow
///

pub struct ConfigWorkflow;

impl ConfigWorkflow {
    pub fn export_toml() -> Result<String, InternalError> {
        ConfigOps::export_toml()
    }
}