Refactor master branch to match last tag. There was an issue with formatting for some reason

This commit is contained in:
brotoskyj
2026-01-08 15:46:25 -05:00
parent e19b748bac
commit ccfdf4e7ab
+3 -6
View File
@@ -1,7 +1,6 @@
use opentelemetry::trace::SpanContext;
use crate::modules::datatypes::*; use crate::modules::datatypes::*;
use crate::prelude::*; use crate::prelude::*;
use opentelemetry::trace::SpanContext;
#[pyfunction] #[pyfunction]
pub fn pull_policy_exec_histories( pub fn pull_policy_exec_histories(
@@ -111,7 +110,7 @@ pub fn pull_policy_exec_histories(
let (tx, rx) = unbounded::<(SpanContext, Vec<Group>)>(); let (tx, rx) = unbounded::<(SpanContext, Vec<Group>)>();
let pb_clone = progress_bar.clone(); let pb_clone = progress_bar.clone();
thread::spawn(move || { thread::spawn(move || {
let tracer = global::tracer("Loxide"); let tracer = global::tracer("loxide");
let mut seen: HashMap<(String, String, String), Group> = if writeable_filepath.exists() let mut seen: HashMap<(String, String, String), Group> = if writeable_filepath.exists()
{ {
let contents: String = fs::read_to_string(&writeable_filepath).unwrap_or_default(); let contents: String = fs::read_to_string(&writeable_filepath).unwrap_or_default();
@@ -292,7 +291,6 @@ pub fn pull_policy_exec_histories(
} }
} }
} }
tracer_provider.force_flush();
}); });
progress_bar progress_bar
.lock() .lock()
@@ -305,7 +303,6 @@ pub fn pull_policy_exec_histories(
std::process::abort(); std::process::abort();
} }
}; };
tracer_provider.force_flush();
tracer_provider tracer_provider
.shutdown() .shutdown()
.expect("Failed to Shutdown Tracer Provdier"); .expect("Failed to Shutdown Tracer Provdier");
@@ -346,7 +343,7 @@ async fn history_logging(
); );
let res: Result<reqwest::Response, reqwest::Error> = client let res: Result<reqwest::Response, reqwest::Error> = client
.post(format!("{}/v1/logging/exechistories", base_url)) .post(format!("{}/v1/logging/exechistories", base_url))
.json(&payload) .body(payload)
.send() .send()
.await; .await;
match res { match res {