Add all connectors
This commit is contained in:
24
moneymgr_backend/src/routines.rs
Normal file
24
moneymgr_backend/src/routines.rs
Normal file
@ -0,0 +1,24 @@
|
||||
use crate::app_config::AppConfig;
|
||||
use std::time::Duration;
|
||||
|
||||
/// The "cron" of the project
|
||||
pub async fn main_routine() {
|
||||
loop {
|
||||
tokio::time::sleep(Duration::from_secs(AppConfig::get().routine_interval)).await;
|
||||
|
||||
log::info!("Start to execute regular routine");
|
||||
match exec_routine().await {
|
||||
Ok(_) => {
|
||||
log::info!("Routine successfully executed")
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("Failed to execute routine! {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn exec_routine() -> anyhow::Result<()> {
|
||||
// TODO
|
||||
Ok(())
|
||||
}
|
Reference in New Issue
Block a user