graceguo-supercat commented on a change in pull request #10963:
URL:
https://github.com/apache/incubator-superset/pull/10963#discussion_r495284771
##########
File path: superset/utils/decorators.py
##########
@@ -89,13 +103,25 @@ def wrapper(*args: Any, **kwargs: Any) ->
ETagResponseMixin:
raise
logger.exception("Exception possibly due to cache
backend.")
+ # if cache is stale?
+ if check_latest_changed_on:
+ latest_changed_on = check_latest_changed_on(*args, **kwargs)
+ if response and response.last_modified:
+ latest_record = response.last_modified.replace(
+ tzinfo=timezone.utc
Review comment:
this convert, `.replace(tzinfo)` is not necessary, removed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]