Module monitor

Module monitor 

Source
Expand description

Task monitoring and execution module.

This module provides the core functionality for managing and executing tasks with dependency relationships. It includes configuration types, error handling, event monitoring, and execution strategies.

§Core Components

§Usage

The typical workflow involves:

  1. Create task specifications with dependencies
  2. Build a TaskMonitor with the task collection
  3. Execute tasks either directly or with event monitoring
use std::collections::HashMap;
use tcrm_monitor::monitor::{tasks::TaskMonitor, config::{TaskSpec, TaskShell}};
use tcrm_task::tasks::config::TaskConfig;

let mut tasks = HashMap::new();

tasks.insert(
    "compile".to_string(),
    TaskSpec::new(TaskConfig::new("cargo").args(["build"]))
        .shell(TaskShell::Auto)
);

let mut monitor = TaskMonitor::new(tasks)?;
monitor.execute_all_direct(None).await;

Re-exports§

pub use tasks::TaskMonitor;

Modules§

config
Task configuration types and shell definitions.
depend
error
Error types for task monitoring operations.
event
Event system for task monitoring.
executor
tasks
Core task monitoring and execution functionality.