added helper functions to reduce bloat
This commit is contained in:
10
src/util/macros.rs
Normal file
10
src/util/macros.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
// 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 update").await;
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user