Skip to content

Conversation

Jawnnypoo
Copy link
Member

Presently, the number of retries of a Parse command is always set to 5, and is not changeable. This allows you to set the number of max retries via the Parse.Configuration. Example:

 val config = Parse.Configuration.Builder(this)
                .applicationId("test")
                .clientKey("blah")
                .server("https://example.com/parse")
                .maxRetries(2)
                .build()

or even disable retries by setting maxRetries(0)

@natario1
Copy link
Contributor

+10 for removing ParsePlugins.Android, such a headache. Looks good to me.

@codecov
Copy link

codecov bot commented Jan 31, 2018

Codecov Report

Merging #782 into master will decrease coverage by 0.07%.
The diff coverage is 40.81%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #782      +/-   ##
============================================
- Coverage     53.42%   53.34%   -0.08%     
- Complexity     1748     1749       +1     
============================================
  Files           132      132              
  Lines         10295    10267      -28     
  Branches       1428     1426       -2     
============================================
- Hits           5500     5477      -23     
+ Misses         4340     4337       -3     
+ Partials        455      453       -2
Impacted Files Coverage Δ Complexity Δ
...c/main/java/com/parse/NetworkObjectController.java 100% <ø> (ø) 10 <0> (ø) ⬇️
Parse/src/main/java/com/parse/ParseHttpClient.java 92.42% <ø> (+2.14%) 15 <0> (-2) ⬇️
...arse/src/main/java/com/parse/ParseRESTCommand.java 82.72% <ø> (-0.16%) 51 <0> (-1)
Parse/src/main/java/com/parse/ParseObject.java 50.95% <ø> (+0.06%) 205 <0> (ø) ⬇️
...e/src/main/java/com/parse/ParseFileController.java 80% <ø> (-0.42%) 14 <0> (ø)
...src/main/java/com/parse/ParseConfigController.java 100% <ø> (ø) 3 <0> (ø) ⬇️
...arse/src/main/java/com/parse/PushServiceApi26.java 0% <0%> (ø) 0 <0> (ø) ⬇️
...rc/main/java/com/parse/NetworkQueryController.java 70% <0%> (+1.48%) 5 <0> (ø) ⬇️
.../src/main/java/com/parse/CacheQueryController.java 6.81% <0%> (ø) 1 <0> (ø) ⬇️
Parse/src/main/java/com/parse/PushService.java 64.1% <100%> (ø) 16 <0> (ø) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c1fc653...aa55fed. Read the comment docs.

@addisonElliott
Copy link
Contributor

If I get time, I'll check this out.

@Jawnnypoo Wanted to let you know that this was on my (long) TODO list and I'm glad you submitted a PR for this! 👍

@rogerhu
Copy link
Contributor

rogerhu commented Jan 31, 2018

@addisonElliott if you can check it out that would be much appreciated =)

@addisonElliott
Copy link
Contributor

Looks good to me. I pulled it locally and tested it out.

On a sidenote, what is the purpose of userAgent in the ParsePlugins class? It seems it is not used in Parse Android SDK and it is a private package, so it cannot be called. It may be worthwhile to create a function in Parse.java that calls this function. I can submit the PR if you would like.

@Jawnnypoo Jawnnypoo merged commit 937fc85 into parse-community:master Feb 1, 2018
@Jawnnypoo Jawnnypoo deleted the max-retries branch February 1, 2018 04:11
bitterbit pushed a commit to bitterbit/Parse-SDK-Android that referenced this pull request Mar 9, 2018
* Remove ParsePlugins abstraction to Android, since that is our only target

* Remove obsolete setting of system properties

* Remove references to enabling/disable retry on command since all are retry enabled

* Use max retries from configuration

* Use the same default max retries as ParseRequest
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.

4 participants