// src/macros.rs
#[macro_export]
macro_rules! check_shutdown {
    ($shutdown_flag:expr) => {
        if $shutdown_flag.load(std::sync::atomic::Ordering::SeqCst) {
            logger::log_warn("Shutdown detected, stopping processes").await;
            return Ok(());
        }
    };
}