From cbe4f379da2dfe6be123061b757c00b0552d04d7 Mon Sep 17 00:00:00 2001 From: blek Date: Fri, 13 Oct 2023 09:17:30 +1000 Subject: [PATCH] fix broken expired method --- filed/src/db.rs | 2 +- janitor/src/file.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filed/src/db.rs b/filed/src/db.rs index b07fd33..96524dd 100644 --- a/filed/src/db.rs +++ b/filed/src/db.rs @@ -9,4 +9,4 @@ use crate::env::Env; pub fn redis_conn(env: Env) -> Result { log::info!("Connecting to redis DB on {}", env.redis.host); redis::Client::open(format!("redis://:{}@{}:{}/", env.redis.pass, env.redis.host, env.redis.port)) -} \ No newline at end of file +} diff --git a/janitor/src/file.rs b/janitor/src/file.rs index f036b29..ada137d 100644 --- a/janitor/src/file.rs +++ b/janitor/src/file.rs @@ -14,6 +14,6 @@ pub struct File { impl File { pub fn expired(self: &Self) -> bool { - self.delete_at > chrono::Local::now() + self.delete_at < chrono::Local::now() } } \ No newline at end of file