mirror of
https://git.pleroma.social/pleroma/relay.git
synced 2024-11-22 06:27:59 +00:00
use correct type when deleting old database cache items
This commit is contained in:
parent
e6845136eb
commit
c5633808f7
|
@ -243,11 +243,10 @@ class SqlCache(Cache):
|
|||
if self._db is None:
|
||||
raise RuntimeError("Database has not been setup")
|
||||
|
||||
limit = Date.new_utc() - timedelta(days = days)
|
||||
params = {"limit": limit.timestamp()}
|
||||
date = Date.new_utc() - timedelta(days = days)
|
||||
|
||||
with self._db.session(True) as conn:
|
||||
with conn.execute("DELETE FROM cache WHERE updated < :limit", params):
|
||||
with conn.execute("DELETE FROM cache WHERE updated < :limit", {"limit": date}):
|
||||
pass
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue