Minor Memory Optimization in Airlock Libs
Build Library / Build Library (push) Successful in 4m8s

This commit is contained in:
brotoskyj
2025-11-06 10:35:21 -05:00
parent cd63d61677
commit d5c9bbe38e
6 changed files with 9 additions and 5 deletions
+1
View File
@@ -1,3 +1,4 @@
*.toml
!airlock_libs/Cargo.toml !airlock_libs/Cargo.toml
!airlock_libs/pyproject.toml !airlock_libs/pyproject.toml
.env .env
+1 -1
View File
@@ -17,7 +17,7 @@ dependencies = [
[[package]] [[package]]
name = "airlock_libs" name = "airlock_libs"
version = "1.0.2" version = "1.0.3"
dependencies = [ dependencies = [
"chrono", "chrono",
"indicatif", "indicatif",
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "airlock_libs" name = "airlock_libs"
version = "1.0.2" version = "1.0.3"
edition = "2024" edition = "2024"
[lib] [lib]
+1 -1
View File
@@ -4,7 +4,7 @@ build-backend = "maturin"
[project] [project]
name = "airlock_libs" name = "airlock_libs"
version = "1.0.2" version = "1.0.3"
description = "Airlock Digital API Wrapper" description = "Airlock Digital API Wrapper"
readme = "README.md" readme = "README.md"
license = { text = "AGPL-3.0-only" } license = { text = "AGPL-3.0-only" }
+1 -1
View File
@@ -95,6 +95,7 @@ pub fn pull_policy_exec_histories(
progress_bar.enable_steady_tick(std::time::Duration::from_millis(100)); progress_bar.enable_steady_tick(std::time::Duration::from_millis(100));
let client = build_client(py, &py_self); let client = build_client(py, &py_self);
let api: Py<PyAny> = py_self; let api: Py<PyAny> = py_self;
let cutoff = Local::now().naive_local() - Duration::days(days);
loop { loop {
let execution_histories = history_logging( let execution_histories = history_logging(
py, py,
@@ -152,7 +153,6 @@ pub fn pull_policy_exec_histories(
Ok(date) => date, Ok(date) => date,
Err(_) => continue, Err(_) => continue,
}; };
let cutoff = Local::now().naive_local() - Duration::days(days);
if history_date >= cutoff.into() { if history_date >= cutoff.into() {
let key = ( let key = (
executions.sha256.clone(), executions.sha256.clone(),
+4 -1
View File
@@ -8,4 +8,7 @@ requests==2.32.5
schedule==1.2.2 schedule==1.2.2
tqdm==4.67.1 tqdm==4.67.1
urllib3==2.5.0 urllib3==2.5.0
bson==0.5.10 bson==0.5.10
--extra-index-url https://git.racooncity.org/api/packages/brotoskyj/pypi/simple/
airlock_libs==1.0.3