-
Notifications
You must be signed in to change notification settings - Fork 900
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
Add a last sent date to heartbeat storage #6039
Conversation
🦋 Changeset detectedLatest commit: 303d844 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Size Report 1Affected Products
Test Logs |
Size Analysis Report 1This report is too large (154,095 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.Test Logs |
iiuc, this has a lot of internally-viewable comments with "//" but no 3P-visible comments that would get parsed into reference docs. LMK if that's not true Christina, thanks! |
// If it's still null or the array is empty, there is no data to send. | ||
if ( | ||
this._heartbeatsCache === null || | ||
this._heartbeatsCache.heartbeats.length === 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.
is it possible for this._heartbeatsCache.heartbeats
to be undefined while this._heartbeatsCache
is not null.
Might be worth an additional check on heartbeats
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.
Seeing below it's not super obvious how it's even possible
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.
Typescript should catch if there's ever an attempt to assign an object to this._heartbeatsCache that doesn't have a heartbeats property.
Persist date of last sent heartbeat header, to prevent adding any more entries for that date. This is done by adding a
lastSentHeartbeatDate
to the heartbeat object stored in IndexedDB (and retained in app memory asthis._heartbeatsCache
).