diff options
| -rw-r--r-- | bot/exts/info/doc/_redis_cache.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/info/doc/_redis_cache.py b/bot/exts/info/doc/_redis_cache.py index 2230884c9..e8577aa64 100644 --- a/bot/exts/info/doc/_redis_cache.py +++ b/bot/exts/info/doc/_redis_cache.py @@ -19,7 +19,8 @@ class DocRedisCache(RedisObject): Keys expire after a week to keep data up to date. """ - expiry_timestamp = datetime.datetime.now().timestamp() + 7 * 24 * 60 * 60 + expiry_timestamp = (datetime.datetime.now() + datetime.timedelta(weeks=1)).timestamp() + with await self._get_pool_connection() as connection: await connection.hset( f"{self.namespace}:{item.package}", @@ -34,7 +35,7 @@ class DocRedisCache(RedisObject): Keys expire after a week to keep data up to date. """ - expiry_timestamp = datetime.datetime.now().timestamp() + 7 * 24 * 60 * 60 + expiry_timestamp = (datetime.datetime.now() + datetime.timedelta(weeks=1)).timestamp() with await self._get_pool_connection() as connection: if await connection.hexists(f"{self.namespace}:{item.package}", self.get_item_key(item)): |