diff options
author | Joris | 2025-01-26 17:58:57 +0100 |
---|---|---|
committer | Joris | 2025-01-26 17:58:57 +0100 |
commit | 24eeb54a6b7159964e8887ade7fa5173b50feb3a (patch) | |
tree | 91af6253df784445db9b084b02b38b37a83224e8 /src/jobs/mod.rs | |
parent | c5759f348e70cf54b4bfa4cd17e1fe1828ead30a (diff) |
Replace tera by minijinjamain
tera was doing the job all right, but minijinja has fewer dependencies.
Diffstat (limited to 'src/jobs/mod.rs')
-rw-r--r-- | src/jobs/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jobs/mod.rs b/src/jobs/mod.rs index 17df58c..a718d93 100644 --- a/src/jobs/mod.rs +++ b/src/jobs/mod.rs @@ -1,14 +1,17 @@ mod weekly_report; use sqlx::sqlite::SqlitePool; -use tera::Tera; use tokio::time::{sleep, Duration}; use crate::db; use crate::model::config::Config; use crate::model::job::Job; -pub async fn start(config: Config, pool: SqlitePool, templates: Tera) { +pub async fn start( + config: Config, + pool: SqlitePool, + templates: minijinja::Environment<'_>, +) { loop { if db::jobs::should_run(&pool, Job::WeeklyReport).await { log::info!("Starting weekly report job"); |