fix broken expired method
This commit is contained in:
parent
cf6406602a
commit
cbe4f379da
|
@ -9,4 +9,4 @@ use crate::env::Env;
|
||||||
pub fn redis_conn(env: Env) -> Result<Client, RedisError> {
|
pub fn redis_conn(env: Env) -> Result<Client, RedisError> {
|
||||||
log::info!("Connecting to redis DB on {}", env.redis.host);
|
log::info!("Connecting to redis DB on {}", env.redis.host);
|
||||||
redis::Client::open(format!("redis://:{}@{}:{}/", env.redis.pass, env.redis.host, env.redis.port))
|
redis::Client::open(format!("redis://:{}@{}:{}/", env.redis.pass, env.redis.host, env.redis.port))
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,6 @@ pub struct File {
|
||||||
|
|
||||||
impl File {
|
impl File {
|
||||||
pub fn expired(self: &Self) -> bool {
|
pub fn expired(self: &Self) -> bool {
|
||||||
self.delete_at > chrono::Local::now()
|
self.delete_at < chrono::Local::now()
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue