From 2016f057d3af5df66b5dcf2d76595cd12256253c Mon Sep 17 00:00:00 2001 From: Jonathan Zernik Date: Fri, 22 Oct 2021 19:42:54 -0500 Subject: [PATCH] Rename received_offer is expired property of db class (#1682) --- squeaknode/db/squeak_db.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/squeaknode/db/squeak_db.py b/squeaknode/db/squeak_db.py index 9437d80b..123a59d4 100644 --- a/squeaknode/db/squeak_db.py +++ b/squeaknode/db/squeak_db.py @@ -159,7 +159,7 @@ class SqueakDb: return int(time.time() * 1000) @property - def received_offer_should_be_deleted(self): + def received_offer_is_expired(self): expire_time = ( self.received_offers.c.invoice_timestamp + self.received_offers.c.invoice_expiry @@ -1007,7 +1007,7 @@ class SqueakDb: select([self.received_offers]) .where(self.received_offers.c.squeak_hash == squeak_hash) .where(self.received_offer_is_not_paid) - .where(not_(self.received_offer_should_be_deleted)) + .where(not_(self.received_offer_is_expired)) ) with self.get_connection() as connection: result = connection.execute(s) @@ -1058,7 +1058,7 @@ class SqueakDb: def delete_expired_received_offers(self): """ Delete all expired offers. """ s = self.received_offers.delete().where( - self.received_offer_should_be_deleted + self.received_offer_is_expired ) with self.get_connection() as connection: res = connection.execute(s)