aboutsummaryrefslogtreecommitdiff
path: root/src/jobs
diff options
context:
space:
mode:
authorJoris2024-06-02 12:53:20 +0200
committerJoris2024-06-02 12:53:20 +0200
commit0d5ec3626773edb7d32884c594230c7cc03ae0e7 (patch)
tree768b6d6fee0b5409c7a12f5aa7b191a25ca5f2d7 /src/jobs
parent76a761630a8e6f5686d7e4384948ed949f702f3b (diff)
Simplify logging initmain
Diffstat (limited to 'src/jobs')
-rw-r--r--src/jobs/mod.rs4
-rw-r--r--src/jobs/weekly_report.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/jobs/mod.rs b/src/jobs/mod.rs
index 5f95597..17df58c 100644
--- a/src/jobs/mod.rs
+++ b/src/jobs/mod.rs
@@ -11,14 +11,14 @@ use crate::model::job::Job;
pub async fn start(config: Config, pool: SqlitePool, templates: Tera) {
loop {
if db::jobs::should_run(&pool, Job::WeeklyReport).await {
- info!("Starting weekly report job");
+ log::info!("Starting weekly report job");
if weekly_report::send(&config, &pool, &templates).await {
db::jobs::actualize_last_execution(&pool, Job::WeeklyReport)
.await;
}
}
if db::jobs::should_run(&pool, Job::MonthlyPayment).await {
- info!("Starting monthly payment job");
+ log::info!("Starting monthly payment job");
db::payments::create_monthly_payments(&pool).await;
db::jobs::actualize_last_execution(&pool, Job::MonthlyPayment)
.await;
diff --git a/src/jobs/weekly_report.rs b/src/jobs/weekly_report.rs
index b482f0d..0c10143 100644
--- a/src/jobs/weekly_report.rs
+++ b/src/jobs/weekly_report.rs
@@ -30,7 +30,7 @@ pub async fn send(
.await
}
Err(err) => {
- error!("Error preparing weekly report from template: {:?}", err);
+ log::error!("Error preparing weekly report from template: {:?}", err);
false
}
}