Skip to content
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

Refactor pushStatusHandler to use Parse instead of direct access #4173

Merged
merged 8 commits into from
Sep 18, 2017

Conversation

flovilmart
Copy link
Contributor

  • PushStatus now uses the REST API, so we can leverage beforeSave/afterSave
  • Block beforeSave(_PushStatus) as we use an internally non documented dot notation update, and the JS SDK don't like it much
  • Adds support in database controller to properly resolve dot incremented properties
  • Adds tests for ensuring we have a sane object in afterSave.

My intended use? Forward analytics with _PushStatus

Worth noting: when using the experimental direct access, this is pretty much 0 overhead.

@codecov
Copy link

codecov bot commented Sep 16, 2017

Codecov Report

Merging #4173 into master will increase coverage by 0.07%.
The diff coverage is 97.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4173      +/-   ##
==========================================
+ Coverage   92.13%   92.21%   +0.07%     
==========================================
  Files         116      116              
  Lines        8044     8075      +31     
==========================================
+ Hits         7411     7446      +35     
+ Misses        633      629       -4
Impacted Files Coverage Δ
src/Push/PushWorker.js 93.44% <100%> (ø) ⬆️
src/cloud-code/Parse.Cloud.js 97.22% <100%> (+2.22%) ⬆️
src/triggers.js 94.17% <100%> (+0.2%) ⬆️
src/Controllers/DatabaseController.js 94.68% <100%> (+0.09%) ⬆️
src/StatusHandler.js 98.56% <95.65%> (-0.61%) ⬇️
...dapters/Storage/Postgres/PostgresStorageAdapter.js 96.61% <0%> (+0.11%) ⬆️
src/RestWrite.js 93.07% <0%> (+0.37%) ⬆️
src/Adapters/Auth/meetup.js 89.47% <0%> (+5.26%) ⬆️

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 ba0a51d...6c60f30. Read the comment docs.

@flovilmart flovilmart changed the title Standalone push worker Refactor pushStatusHandler to use Parse instead of direct access Sep 16, 2017
@@ -127,6 +127,7 @@ describe('Parse.Push', () => {
alert: 'Hello world!'
}
}, {useMasterKey: true}))
.then(() => delayPromise(500))
Copy link
Contributor

Choose a reason for hiding this comment

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

can these be any shorter?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

nope, not really, because we don't wait till it's completed...

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.

3 participants