Saving changes
catapult PR / Clippy (pull_request) Failing after 52s
catapult PR / Rustfmt (pull_request) Failing after 1m2s
catapult PR / Check (pull_request) Successful in 2m16s

This commit is contained in:
2026-06-22 17:11:08 -04:00
parent 702fead8c8
commit 0f9753874b
3 changed files with 213 additions and 22 deletions
+19 -1
View File
@@ -14,8 +14,26 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
}
};
let auth = catapult::service::auth::Auth {
app: app.clone()
};
let token = match auth.get_token().await {
Ok(token) => token,
Err(err) => {
eprintln!("Error getting token");
eprintln!("Error: {err:?}");
std::process::exit(-1);
}
};
let mut svc = catapult::service::Service {
app: app.clone(),
token
};
loop {
catapult::service::do_the_work(&app).await;
// catapult::service::do_the_work(&app).await;
svc.do_the_work().await;
tokio::time::sleep(tokio::time::Duration::from_secs(
catapult::app::SECONDS_TO_SLEEP,
))