-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[card-client] make Card.get_data
more efficient
#1750
[card-client] make Card.get_data
more efficient
#1750
Conversation
data_paths = self._card_ds.extract_data_paths( | ||
card_type=self.type, card_hash=self.hash, card_id=self._card_id | ||
) | ||
if len(data_paths) == 0: | ||
return None | ||
self._data_path = data_paths[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s3 list calls are costly so caching the location is useful.
- Helps ensure that stale updates from a server can be ignored
return { | ||
"reload_token": _reload_token(), | ||
"data": json_msg, | ||
"created_on": time.time(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
driveby change: add a timestamp in the dataupdate call. It helps discard data updates that maybe stale.
@@ -14,8 +14,6 @@ export const cardData: Writable<types.CardResponse | undefined> = | |||
(window as any).metaflow_card_update = ( | |||
dataChanges: Record<string, types.CardComponent> | |||
) => { | |||
console.log("metaflow_card_update", dataChanges, cardData?.update); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Driveby change: remove un-necessary console.log
No description provided.