Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Refactor uploads - Part 3 #228

Merged
merged 32 commits into from
Sep 8, 2023
Merged

Conversation

syoung-smallwisdom
Copy link
Collaborator

This has been tested on a single device with WiFi toggling.

It uses BridgeClient (cross platform Kotlin binary) to track pending uploads and to launch uploading the adherence records, uploads, and upload complete messages. It uses URLBackgroundSession to handle the S3 upload. Finally, it relies upon using BGTaskScheduler to schedule a background process (to run when the phone is sleeping and connected to wifi) to handle launching adherence record and archive uploading if there isn't a Wifi connection.

The background process sync manager was set up this way to allow testing using
this manager in a simplified app. The use of `BGTaskScheduler` is a bit brittle
- as of this writing, a background process that runs when the app is backgrounded
will stall on tasks that are running on the `MainActor` so only
``onLaunch(backgroundProcessId:)`` is ever called from that thread.
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

Unit Test Results

  39 files    39 suites   24s ⏱️
  83 tests   83 ✔️ 0 💤 0
127 runs  127 ✔️ 0 💤 0

Results for commit d474360.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@Erin-Mounts Erin-Mounts left a comment

Choose a reason for hiding this comment

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

Looks good--thanks for the detailed walk-through

Copy link
Collaborator

@nategbrown9 nategbrown9 left a comment

Choose a reason for hiding this comment

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

Looks good.

@syoung-smallwisdom syoung-smallwisdom merged commit 3099663 into main Sep 8, 2023
4 checks passed
@syoung-smallwisdom syoung-smallwisdom deleted the syoung/refactor-upload-3 branch September 8, 2023 00:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants