RUM-1194 DataUploadWorker is scheduled every time and on non - roaming network#1647
Merged
mariusc83 merged 1 commit intoSep 29, 2023
Conversation
mariusc83
commented
Sep 28, 2023
| val workManager = WorkManager.getInstance(context) | ||
| val constraints = Constraints.Builder() | ||
| .setRequiredNetworkType(NetworkType.CONNECTED) | ||
| .setRequiredNetworkType(NetworkType.UNMETERED) |
Member
Author
There was a problem hiding this comment.
should we let it go no matter what the network type is ? I am thinking in situations where the client is on ROAMING and we are sending data under the hood which might not be wise.
Member
There was a problem hiding this comment.
Looks like WorkManager has a constraint of NOT_ROAMING - could we use this?
Member
Author
There was a problem hiding this comment.
oh good catch...we could indeed use that which is better, we care about ROAMING specifically here
mariusc83
force-pushed
the
mconstanting/rum-1194/schedule-upload-worker-all-the-time
branch
from
September 28, 2023 13:48
6a6741b to
0d28be2
Compare
mariusc83
marked this pull request as ready for review
September 28, 2023 13:48
Codecov Report
@@ Coverage Diff @@
## develop #1647 +/- ##
========================================
Coverage 83.68% 83.68%
========================================
Files 456 456
Lines 15696 15690 -6
Branches 2347 2345 -2
========================================
- Hits 13135 13130 -5
- Misses 1927 1935 +8
+ Partials 634 625 -9
|
mariusc83
force-pushed
the
mconstanting/rum-1194/schedule-upload-worker-all-the-time
branch
from
September 28, 2023 14:41
0d28be2 to
0a866d5
Compare
mariusc83
force-pushed
the
mconstanting/rum-1194/schedule-upload-worker-all-the-time
branch
from
September 28, 2023 14:45
0a866d5 to
ef7b0c0
Compare
xgouchet
approved these changes
Sep 29, 2023
0xnm
approved these changes
Sep 29, 2023
mariusc83
deleted the
mconstanting/rum-1194/schedule-upload-worker-all-the-time
branch
September 29, 2023 08:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Previously our data upload worker was scheduled only if the device was offline and on any type of network. We are currently scheduling this all the time and only if the network is unmetered (WIFI or any other form of unmetered network)
We also updated the default
inBackgroundstate in theBatchMetricsDispatcherastrueto handle correctly the metrics sent from the scheduled upload worker.Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)