diff options
| author | Mroik <mroik@delayed.space> | 2026-03-01 16:07:21 +0100 |
|---|---|---|
| committer | Mroik <mroik@delayed.space> | 2026-03-01 16:07:21 +0100 |
| commit | 0a249e2d0c1bd606ab8b4ed41423fc734ec62496 (patch) | |
| tree | f3e802d46a62e7635fdbf4e441c9852570c5007c /src | |
| parent | ba94ad54c36bbfeeb82d540afdf239b083c0889c (diff) | |
Log the error and move on instead of crashing
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 2d7cd35..885502b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -29,7 +29,10 @@ async fn main() -> Result<()> { let interval = var("INTERVAL")?.parse::<u32>()?; scheduler.every(Interval::Hours(interval)).run(|| async { - backup().await.unwrap(); + match backup().await { + Ok(_) => (), + Err(e) => println!("There was an error: {}", e), + } }); info!("Program set to backup every {} hours", interval); |
