Skip to content

Commit

Permalink
refactor: replace NormalAlerts with ReconnectAlerts for improved reco…
Browse files Browse the repository at this point in the history
…nnection handling
  • Loading branch information
Kremilly committed Jan 3, 2025
1 parent 5827a79 commit ce85eb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/handlers/dump_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::{

ui::{
errors_alerts::ErrorsAlerts,
normal_alerts::NormalAlerts,
reconnect_alerts::ReconnectAlerts,
},
};

Expand Down Expand Up @@ -61,7 +61,7 @@ impl DumpHandlers {
ErrorsAlerts::max_attempts();
process::exit(1);
} else {
NormalAlerts::reconnect(*attempt as u64, max_retries);
ReconnectAlerts::reconnect(*attempt as u64, max_retries);
thread::sleep(Duration::from_secs(retry_interval));
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub mod schema_alerts;
pub mod checksum_alerts;
pub mod report_xss_alerts;

pub mod normal_alerts;
pub mod reconnect_alerts;
pub mod report_alerts;
pub mod errors_alerts;
pub mod success_alerts;
4 changes: 2 additions & 2 deletions src/ui/normal_alerts.rs → src/ui/reconnect_alerts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use colored::*;

use crate::utils::date::Date;

pub struct NormalAlerts;
pub struct ReconnectAlerts;

impl NormalAlerts {
impl ReconnectAlerts {

pub fn reconnect(attempt: u64, max_retries: u64) {
let current_datetime = Date::date_time();
Expand Down

0 comments on commit ce85eb1

Please sign in to comment.