Skip to content

Commit

Permalink
feat: add process exit on max retry attempts in DumpHandlers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kremilly committed Nov 16, 2024
1 parent c76cb86 commit 8d5e501
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/helpers/dump_handlers.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use chrono::Local;

use std::{
fs,
thread,
path::Path,
fs,
thread,
process,
path::Path,
time::Duration,
};

Expand Down Expand Up @@ -58,6 +59,7 @@ impl DumpHandlers {
*attempt += 1;
if *attempt >= max_retries as usize {
ErrorsAlerts::max_attempts();
process::exit(1);
} else {
NormalAlerts::reconnect(*attempt as u64, max_retries);
thread::sleep(Duration::from_secs(retry_interval));
Expand Down

0 comments on commit 8d5e501

Please sign in to comment.