diff options
author | Joris | 2024-06-07 12:34:47 +0200 |
---|---|---|
committer | Joris | 2024-06-07 12:34:47 +0200 |
commit | 2ee900eed41aebeb0f6f791f96bacb21779e6ac0 (patch) | |
tree | 6defc626c0e1284bb9058ad4bf439dc8a83331c2 /src/main.rs | |
parent | 1019ea1ed341e3a7769c046aa0be5764789360b6 (diff) |
Add job to remove expired files
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 27da278..b2af6de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,7 @@ use tokio::net::TcpListener; use tokio_rusqlite::Connection; mod db; +mod jobs; mod model; mod routes; mod templates; @@ -27,6 +28,8 @@ async fn main() -> std::result::Result<(), Box<dyn std::error::Error>> { .await .expect("Error while openning DB conection"); + tokio::spawn(jobs::start(db_conn.clone(), files_dir.clone())); + let addr: SocketAddr = format!("{host}:{port}") .parse() .unwrap_or_else(|_| panic!("Invalid address: {host}:{port}")); |