RustImplementation #25

Merged
mysticmomba merged 13 commits from RustImplementation into master 2025-11-07 11:39:51 -05:00
Showing only changes of commit 954aa24b37 - Show all commits
+4 -2
View File
@@ -15,7 +15,7 @@ use std::{
fs::{self, File},
io::Read,
path::PathBuf,
str::FromStr,
str::FromStr, sync::mpsc::{Sender, Receiver, channel},
};
#[derive(Debug, Deserialize, Serialize)]
@@ -96,7 +96,9 @@ pub fn pull_policy_exec_histories(
let client = build_client(py, &py_self);
let api: Py<PyAny> = py_self;
let cutoff = Local::now().naive_local() - Duration::days(days);
let (tx, rx):(Sender<Group>, Receiver<Group>) = channel();
loop {
let thread_tx = tx.clone();
let execution_histories = history_logging(
py,
&api,
@@ -178,7 +180,7 @@ pub fn pull_policy_exec_histories(
{
let date_diff = Local::now().naive_local().date() - last_date;
let percentage_diff =
((days + 10) - date_diff.num_days()) as f64 / (days + 10) as f64 * 100.0;
(days - date_diff.num_days()) as f64 / days as f64 * 100.0;
progress_bar.set_position(percentage_diff.round() as u64);
progress_bar.set_message("Total Percent Complete");
}