chore: calculate excelence percentual for chats

This commit is contained in:
2025-11-05 10:32:47 -03:00
parent 1ba0510a3e
commit ca227ee45f
3 changed files with 87 additions and 71 deletions

View File

@@ -10,8 +10,8 @@ use serde_json::{self, json};
use std::io::prelude::*;
pub mod zip_directory_util;
pub mod send_mail_util;
pub mod zip_directory_util;
fn main() -> anyhow::Result<()> {
match dotenv::dotenv().ok() {
@@ -524,12 +524,18 @@ fn main() -> anyhow::Result<()> {
let source_dir = std::path::Path::new(source_dir_str.as_str());
let output_zip_file = std::path::Path::new(output_zip_file_str.as_str());
zip_directory_util::zip_directory_util::zip_source_dir_to_dst_file(source_dir, output_zip_file);
// Send folder to email
let recipients = "Wilson da Conceição Oliveira <wilson.oliveira@nova.net.br>, Isadora G. Moura de Moura <isadora.moura@nova.net.br>";
println!("Trying to send email... Recipients {recipients}");
send_mail_util::send_mail_util::send_email(&format!("Avaliacao atendimentos {formatted_day_before}"), &BOT_EMAIL, &BOT_EMAIL_PASSWORD, recipients, &output_zip_file_str);
send_mail_util::send_mail_util::send_email(
&format!("Avaliacao atendimentos {formatted_day_before}"),
&BOT_EMAIL,
&BOT_EMAIL_PASSWORD,
recipients,
&output_zip_file_str,
);
return Ok(());
}
@@ -656,4 +662,4 @@ fn get_piperun_chats_on_date(
aggregated_talks.append(&mut all_other_messages);
aggregated_talks
}
}