3

Recently, I have some test on parse.com. I am now facing a problem of using Parse.Object.saveAll in background job.

From the document in parse.com, it says that a background job can run for 15 minutes. I am now setting a background job to pour the data in the database using the following code:

Parse.Cloud.job("createData", function(request, status) {
 
     var Dummy = Parse.Object.extend("dummy");
     var batchSaveArr = [];
 
     for(var i = 0 ; i < 50000 ; i ++){
 
        var obj = new Dummy();
        // genMessage() is a function to generate a random string with 5 characters long
        obj.set("message", genMessage());
        obj.set("numValue",Math.floor(Math.random() * 1000));
        batchSaveArr.push(obj);
     }
 
     Parse.Object.saveAll(batchSaveArr, {
         success: function(list){
              status.success("success");
          },
         error: function(error){
              status.error(error.message);
          }
     });
 
 });

Although it is used to pour data into database, the main purpose is to test the function Parse.Object.saveAll. When I run this job, an error "This application has exceeded its request limit." is appeared in the log. However, when I see the analysis page, it show me that the request count is less than or equal to 1. I only run this job in Parse, and no other request is made during the background is running. It seems that there is some problem on Parse.Object.saveAll. Or maybe I have some misunderstanding on this function.

Are there anyone facing the same problem? How many data can save in one Parse.Object.saveAll request? How many number of request will be used for one Parse.Object.saveAll

paddy
  • 145
  • 2
  • 8
  • `saveAll()` apparantly has a limitation, though I am not sure what that limit is. We have tried with 100 objects with no issues. Hector says, saveAll() should batch the requests, https://parse.com/questions/saveall-limit – satyadeepk Sep 17 '14 at 08:42

1 Answers1

0

I have asked the question in Facebook and the reply is quite disappointed. Please follow the link: https://developers.facebook.com/bugs/439821726158766/

paddy
  • 145
  • 2
  • 8