diff --git a/click_odoo_contrib/initdb.py b/click_odoo_contrib/initdb.py index 42b6f05..08d366a 100644 --- a/click_odoo_contrib/initdb.py +++ b/click_odoo_contrib/initdb.py @@ -306,10 +306,11 @@ def trim_size(self, max_size): self._drop_db(datname) def trim_age(self, max_age): + max_trim = max_age + timedelta(minutes=1) with self._lock(): pattern = self._make_pattern() max_name = self._make_pattern( - dt=datetime.utcnow() - max_age, hs=self.MAX_HASHSUM + dt=datetime.utcnow() - max_trim, hs=self.MAX_HASHSUM ) self.pgcr.execute( """