Skip to content

Commit

Permalink
version bumps
Browse files Browse the repository at this point in the history
  • Loading branch information
ddboline committed Nov 25, 2023
1 parent 8938919 commit 47052f5
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
15 changes: 7 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "security_log_analysis_rust"
version = "0.11.2"
version = "0.11.3"
authors = ["Daniel Boline <[email protected]>"]
edition = "2018"

Expand All @@ -14,10 +14,10 @@ Analyze Auth Logs."""

[dependencies]
anyhow = "1.0"
authorized_users = { git = "https://github.com/ddboline/auth_server_rust.git", tag="0.11.0"}
aws-config = "0.56"
aws-sdk-s3 = "0.34"
aws-sdk-ses = "0.34"
authorized_users = { git = "https://github.com/ddboline/auth_server_rust.git", tag="0.11.3"}
aws-config = {version="1.0", features=["behavior-version-latest"]}
aws-sdk-s3 = "1.1"
aws-sdk-ses = "1.1"
bytes = "1.0"
cached = {version="0.46", features=["async", "async_tokio_rt_multi_thread"]}
chrono = "0.4"
Expand All @@ -35,12 +35,11 @@ env_logger = "0.10"
flate2 = "1.0"
futures = "0.3"
glob = "0.3"
http = "0.2"
itertools = "0.11"
itertools = "0.12"
log = "0.4"
maplit = "1.0"
parking_lot = "0.12"
polars = {version="0.34", features=["temporal", "parquet", "lazy"]}
polars = {version="0.35", features=["temporal", "parquet", "lazy"]}
postgres_query = {git = "https://github.com/ddboline/rust-postgres-query", tag = "0.3.5", features=["deadpool"]}
postgres-types = {version="0.2", features=["with-time-0_3", "with-uuid-1", "with-serde_json-1"]}
rand = "0.8"
Expand Down
13 changes: 9 additions & 4 deletions src/s3_sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ use std::{
path::Path,
time::SystemTime,
};
use tokio::{fs::File, task::{spawn_blocking, spawn, JoinHandle}};
use tokio::{
fs::File,
task::{spawn, spawn_blocking, JoinHandle},
};

use crate::{
exponential_retry, get_md5sum, models::KeyItemCache, pgpool::PgPool,
Expand All @@ -45,12 +48,13 @@ impl KeyItem {
let key = item.key.take()?.into();
let etag = item.e_tag.take()?.trim_matches('"').into();
let timestamp = item.last_modified.as_ref()?.as_secs_f64() as i64;
let size = item.size? as u64;

Some(Self {
key,
etag,
timestamp,
size: item.size as u64,
size,
})
}
}
Expand Down Expand Up @@ -159,7 +163,7 @@ impl S3Sync {
}
}
}
if !output.is_truncated {
if output.is_truncated == Some(false) || output.is_truncated.is_none() {
break;
}
}
Expand Down Expand Up @@ -287,7 +291,8 @@ impl S3Sync {
}

let msg = format_sstr!(
"{title} {s3_bucket} s3_bucketnkeys {n_keys} updated files {local_updates} uploaded {number_uploaded} downloaded {number_downloaded}",
"{title} {s3_bucket} s3_bucketnkeys {n_keys} updated files {local_updates} uploaded \
{number_uploaded} downloaded {number_downloaded}",
);

Ok(msg)
Expand Down
6 changes: 4 additions & 2 deletions src/security_log_http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ use anyhow::Error as AnyhowError;
use cached::{proc_macro::cached, Cached, TimedSizedCache};
use derive_more::{From, Into};
use futures::TryStreamExt;
use http::StatusCode;
use itertools::Itertools;
use log::error;
use rweb::{delete, get, post, reject::Reject, Filter, Json, Query, Rejection, Reply, Schema};
use rweb::{
delete, get, http::StatusCode, post, reject::Reject, Filter, Json, Query, Rejection, Reply,
Schema,
};
use rweb_helper::{derive_rweb_schema, DateTimeType, UuidWrapper};
use serde::{Deserialize, Serialize};
use stack_string::{format_sstr, StackString};
Expand Down
6 changes: 3 additions & 3 deletions src/ses_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ impl SesInstance {
.destination(Destination::builder().to_addresses(dest).build())
.message(
Message::builder()
.subject(Content::builder().data(sub).build())
.subject(Content::builder().data(sub).build()?)
.body(
Body::builder()
.text(Content::builder().data(msg).build())
.html(Content::builder().data(msg).build())
.text(Content::builder().data(msg).build()?)
.html(Content::builder().data(msg).build()?)
.build(),
)
.build(),
Expand Down

0 comments on commit 47052f5

Please sign in to comment.