You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "michael-s-molina (via GitHub)" <gi...@apache.org> on 2024/06/21 14:26:58 UTC
Re: [PR] chore(distributed-lock): refactor tests [superset]
michael-s-molina commented on code in PR #29302:
URL: https://github.com/apache/superset/pull/29302#discussion_r1647499844
##########
superset/commands/key_value/get.py:
##########
@@ -67,6 +66,6 @@ def validate(self) -> None:
def get(self) -> Optional[Any]:
filter_ = get_filter(self.resource, self.key)
entry = db.session.query(KeyValueEntry).filter_by(**filter_).first()
- if entry and (entry.expires_on is None or entry.expires_on > datetime.now()):
+ if entry and not entry.is_expired():
Review Comment:
Nice!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org