Change to send Analytics Data to HealthData Server also#14282
Change to send Analytics Data to HealthData Server also#14282niteskum wants to merge 5 commits intoadobe:masterfrom niteskum:AnalyticsDataBugFixes
Conversation
|
ping @swmitra @navch @vickramdhawal for review |
| } | ||
| }; | ||
|
|
||
| var handleFail = function handleFail() { |
There was a problem hiding this comment.
Probably you wrote this syntax by mistake. This is useful when we are running in IE or when we want to assign a small function name to use inside the function.
There was a problem hiding this comment.
It's not a good idea to write nested function if you function executed multiple time.
| if(sendFailed) { | ||
| PreferencesManager.setViewState(Eventparams.eventName, 0, options); | ||
| } else { | ||
| sendFailed = true; |
There was a problem hiding this comment.
What is the use of this sendFailed? Looks like it will always execute else part.
| .always(function () { | ||
| sendAnalyticsDataToServer(Eventparams, url) | ||
| .done(function () { | ||
| result.resolve(); |
There was a problem hiding this comment.
Just make sure view state is correct in every case like not able to send health data server but successfully sent on analytics server.
There was a problem hiding this comment.
View State is unset only if it fails to send Data to both the server. If it fails for any of one server then it will execute else part and sendFailed is assigned to true. when it will fail for second server also It will go in if part and will unset the view state.
|
@niteskum I'm not sure i understand the purpose of this PR. If the user is offline even posting to health data url will fail. Should we not have simply passed on the data to the HealthLogger which would have guaranteed eventual persistence with the health data. |
|
What is the intent of this change? |
This PR includes changes for sending Analytics Data to HealthData Server.