Skip to content

LOOP-5065 Device log upload fixes#106

Merged
ps2 merged 3 commits intodevfrom
ps2/LOOP-5065/fix-device-log-uploads
Sep 18, 2024
Merged

LOOP-5065 Device log upload fixes#106
ps2 merged 3 commits intodevfrom
ps2/LOOP-5065/fix-device-log-uploads

Conversation

@ps2
Copy link
Contributor

@ps2 ps2 commented Sep 18, 2024

https://tidepool.atlassian.net/browse/LOOP-5065

  • Determination of last uploaded log is fixed; previously it was selecting the oldest log in 2 days
  • Do not attempt upload until we have fetched the list of existing uploaded chunks.

@ps2 ps2 requested review from Camji55 and nhamming September 18, 2024 18:53
Copy link
Contributor

@nhamming nhamming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (non-blocking comments)

nextUploadStart = lastEnd.dateFlooredToTimeInterval(logChunkDuration)
}

if nextLogStart != nil {
Copy link
Contributor

@nhamming nhamming Sep 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not let nextLogStart here instead of force unwrapping below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's updated below=

Comment on lines 64 to 65
// Upload failed, retry in 10 minutes.
try? await Task.sleep(nanoseconds: TimeInterval(minutes: 5).nanoseconds)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment says 10 but code says 5.

@ps2 ps2 merged commit b98c311 into dev Sep 18, 2024
@ps2 ps2 deleted the ps2/LOOP-5065/fix-device-log-uploads branch October 3, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants