added error handling for monitoring
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
80c3faec58
commit
809b252df7
@ -205,8 +205,7 @@ async fn compare_files_changes(
|
||||
match modfiles.inevent.name {
|
||||
Some(name) => {
|
||||
let filename = name.to_str().unwrap();
|
||||
for sak in sas.clone().keys() {
|
||||
let sa = sas.get(sak).unwrap();
|
||||
for (sak, sa) in sas.clone().iter_mut() {
|
||||
if modfiles.inevent.wd == sa.wd {
|
||||
let handle: String;
|
||||
if sa.filename.as_str() == "" {
|
||||
|
@ -10,7 +10,13 @@ use tokio::sync::RwLock;
|
||||
pub async fn apiserver(ctxarc: &Arc<RwLock<Context>>) -> io::Result<()> {
|
||||
let ctxarc = ctxarc.clone();
|
||||
let addr: String = { ctxarc.read().await.cfg.api.parse().unwrap() };
|
||||
let listener = TcpListener::bind(addr).await.unwrap();
|
||||
let listener = match TcpListener::bind(addr).await {
|
||||
Ok(l) => l,
|
||||
Err(err) => {
|
||||
println!("Error: {err}");
|
||||
std::process::exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
tokio::spawn(async move {
|
||||
loop {
|
||||
|
Loading…
Reference in New Issue
Block a user