Click here to Skip to main content
15,891,633 members

Comments by chronodekar (Top 2 by date)

chronodekar 12-Feb-14 1:18am View    
I would *love* to make it a sync call, but the API doesn't support it. :(

-chronodekar
chronodekar 11-Feb-14 11:22am View    
Thanks for the reply Tadit. But sadly, I can't find much use in the links you provided. The first one, I'm more than familiar with. It's the javascript help on parse.com and I've been to that page more times than I can remember.

Link 2 is interesting, but the focus is for a client web-application. My situation is that I need to create a script, which runs as a background task on the parse.com servers. For example in synchronous pseudo-code I want to do this;

do {

call_http_REST_get_on_remote_site(); // async call
parse_current_batch_of_results();

} while (no_more_results_from_remote_site); // this can be decyphered from the reply we get in the first http-get call


The problem I'm facing is that if I try the above in parse-javascript, the call_http_REST_get_on_remote_site() operation is an asynchrous call. The server leaves it at that and proceeds to the next bit - basically running the do-while loop only once! But if it had waited, the results would have clearly shown that the loop needs to run a few more times.

Link 3 & 4 doesn't apply to me as I'm not making a web-app. This will ONLY be running on the server as a background task - no way will a user directly come in contact with it. ... or even indirectly for that matter.

Link 5 is a nice errata, but more than 2 years old.

-chronodekar