Compare commits

...

2 Commits

Author SHA1 Message Date
fa99959508 chore: Release
All checks were successful
Continuous integration / Check (push) Successful in 38s
Continuous integration / Test Suite (push) Successful in 46s
Continuous integration / Trunk (push) Successful in 38s
Continuous integration / Rustfmt (push) Successful in 38s
Continuous integration / build (push) Successful in 53s
Continuous integration / Disallow unused dependencies (push) Successful in 1m55s
2025-04-23 09:31:43 -07:00
0f6af0f475 server: more debug prints 2025-04-23 09:31:25 -07:00
5 changed files with 17 additions and 16 deletions

16
Cargo.lock generated
View File

@ -3034,7 +3034,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-notmuch" name = "letterbox-notmuch"
version = "0.17.12" version = "0.17.13"
dependencies = [ dependencies = [
"itertools", "itertools",
"log", "log",
@ -3049,7 +3049,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-procmail2notmuch" name = "letterbox-procmail2notmuch"
version = "0.17.12" version = "0.17.13"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"clap", "clap",
@ -3062,7 +3062,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-server" name = "letterbox-server"
version = "0.17.12" version = "0.17.13"
dependencies = [ dependencies = [
"ammonia", "ammonia",
"anyhow", "anyhow",
@ -3080,8 +3080,8 @@ dependencies = [
"futures 0.3.31", "futures 0.3.31",
"headers", "headers",
"html-escape", "html-escape",
"letterbox-notmuch 0.17.12", "letterbox-notmuch 0.17.13",
"letterbox-shared 0.17.12", "letterbox-shared 0.17.13",
"linkify", "linkify",
"log", "log",
"lol_html", "lol_html",
@ -3121,10 +3121,10 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-shared" name = "letterbox-shared"
version = "0.17.12" version = "0.17.13"
dependencies = [ dependencies = [
"build-info", "build-info",
"letterbox-notmuch 0.17.12", "letterbox-notmuch 0.17.13",
"regex", "regex",
"serde", "serde",
"sqlx", "sqlx",
@ -3134,7 +3134,7 @@ dependencies = [
[[package]] [[package]]
name = "letterbox-web" name = "letterbox-web"
version = "0.17.12" version = "0.17.13"
dependencies = [ dependencies = [
"build-info", "build-info",
"build-info-build", "build-info-build",

View File

@ -8,7 +8,7 @@ authors = ["Bill Thiede <git@xinu.tv>"]
edition = "2021" edition = "2021"
license = "UNLICENSED" license = "UNLICENSED"
publish = ["xinu"] publish = ["xinu"]
version = "0.17.12" version = "0.17.13"
repository = "https://git.z.xinu.tv/wathiede/letterbox" repository = "https://git.z.xinu.tv/wathiede/letterbox"
[profile.dev] [profile.dev]

View File

@ -27,8 +27,8 @@ css-inline = "0.14.4"
futures = "0.3.31" futures = "0.3.31"
headers = "0.4.0" headers = "0.4.0"
html-escape = "0.2.13" html-escape = "0.2.13"
letterbox-notmuch = { path = "../notmuch", version = "0.17.12", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.13", registry = "xinu" }
letterbox-shared = { path = "../shared", version = "0.17.12", registry = "xinu" } letterbox-shared = { path = "../shared", version = "0.17.13", registry = "xinu" }
linkify = "0.10.0" linkify = "0.10.0"
log = "0.4.27" log = "0.4.27"
lol_html = "2.3.0" lol_html = "2.3.0"

View File

@ -990,6 +990,7 @@ pub async fn label_unprocessed(
// Only process the first file path is multiple files have the same id // Only process the first file path is multiple files have the same id
let path = files.iter().next().unwrap(); let path = files.iter().next().unwrap();
let file = File::open(&path)?; let file = File::open(&path)?;
info!("mmaping {path}");
let mmap = unsafe { MmapOptions::new().map(&file)? }; let mmap = unsafe { MmapOptions::new().map(&file)? };
let m = parse_mail(&mmap)?; let m = parse_mail(&mmap)?;
let (matched_rule, add_tags) = find_tags(&rules, &m.headers); let (matched_rule, add_tags) = find_tags(&rules, &m.headers);
@ -1049,17 +1050,17 @@ pub async fn label_unprocessed(
.push(id.clone()); .push(id.clone());
} }
} }
println!("Adding {} distinct labels", add_mutations.len()); info!("Adding {} distinct labels", add_mutations.len());
for (tag, ids) in add_mutations.iter() { for (tag, ids) in add_mutations.iter() {
println!(" {tag}: {}", ids.len()); info!(" {tag}: {}", ids.len());
if !dryrun { if !dryrun {
let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect(); let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect();
nm.tags_add(tag, &ids)?; nm.tags_add(tag, &ids)?;
} }
} }
println!("Removing {} distinct labels", rm_mutations.len()); info!("Removing {} distinct labels", rm_mutations.len());
for (tag, ids) in rm_mutations.iter() { for (tag, ids) in rm_mutations.iter() {
println!(" {tag}: {}", ids.len()); info!(" {tag}: {}", ids.len());
if !dryrun { if !dryrun {
let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect(); let ids: Vec<_> = ids.iter().map(|s| s.as_str()).collect();
nm.tags_remove(tag, &ids)?; nm.tags_remove(tag, &ids)?;

View File

@ -12,7 +12,7 @@ version.workspace = true
[dependencies] [dependencies]
build-info = "0.0.40" build-info = "0.0.40"
letterbox-notmuch = { path = "../notmuch", version = "0.17.12", registry = "xinu" } letterbox-notmuch = { path = "../notmuch", version = "0.17.13", registry = "xinu" }
regex = "1.11.1" regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] } serde = { version = "1.0.219", features = ["derive"] }
sqlx = "0.8.5" sqlx = "0.8.5"