parse.com - parse background job each() does not go through all records? -


I wrote that a cloud job to include a user's first name and lowercase version of the last name in the user object

When I did this work on Dev Pars App which was like 40 users, then she did a great job.

When I ran this app on my production though it did not update all of my records, I have a few thousand users at the moment and I am hoping to take care of this cloud job for all of them. Here's the explanation:

"Parse.Query objects allow you to do this on every new method, even if you have in the archive Thousands of objects or more, then they are I will give everyone an opportunity to modify them to fit them. "

Then my question is, why would this work leave more than half of my database gives? It only works on a bunch of users, maybe a few hundred

How can I affect my entire data in the User table in this function?

  Parse.Cloud job ("migration 1", function (request, status) {// set to modify user data Parse.Cloud.useMasterKey (); // All users Query for var query = new Parse.Query (Parse.User); query Set each (function (user) {//} and replace var firstname = user.get ("firstname"); if (first name) {user.set ("Searchfirstname", firstname.toLowerCase ());} other {user .set ("searchfirstname", "");} var lastname = user.get ("lastname"); if (last name) {user.set ( "Searchlastname", lastname.toLowerCase ());} else {user.set ("searchstationname", "");} user save U ();}) Then set the status of job (success () (// job status). Success ("search migration completed successfully."),} Function (error) {// job error status set Do the situation ("Uh oh, something went wrong in search migration");});}); Edit: OK, when I see error log, I see it:  
  E2014-10-18T15: 48: 49.984 Z] v63: ran  

I was trying to think in any way and I'm still getting it. same problem. What am I trying to undefine:

  if (last name === undefined || last name === invalid 0 || last name of type == 'undefined'). ..  

I still get lowercase the undefined error and I think this work does not affect my user table because it prevents ...

< P> Any suggestions?

So, finally I came to know why this work did not go through all the records, but this one Some records "randomly" ...

I had an AfterSave hook for the user who triggered each recurrence of the above job ... after saving it will generate an error some time and the job Failed

Therefore, for some reason I thought that after saving the hook the user would not have been saved from saving in any job.

That's it. Now all this works.


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Algorithm negotiation fail SSH in Jenkins -

java - Messages from .properties file do not display UTF-8 characters -