macro_rules! check_quit_increment_counter_ping_database {
(
$quit_flag:expr,
$sleeper:expr,
$sleep_duration:expr,
$loop_counter:expr,
$self_ref:expr,
$sql_interface_mut_ref:expr
) => { ... };
}Expand description
A macro to handle common end-of-loop tasks for Balling and Feed.
This macro encapsulates the logic for:
- Breaking the loop if a quit command has been received.
- Sleeping for a short duration to prevent busy-waiting.
- Incrementing and wrapping a loop counter.
- Pinging the database to keep the connection alive.