Okay
  Public Ticket #1844028
mystream
Closed

Comments

  • samuel started the conversation

    i want to create a parse job that automatically deletes certain object on Mystream app called "isfollowing" which are more than 1 day old inside the class called "Follow"... and i am having difficulties..
    This is my code so far, can you please help me?



    Parse.Cloud.job("deleteOldEntries", function(request, status) {    var yourObject = Parse.Object.extend("Follow");
    var query = new Parse.Query(yourObject);    var day = new Date();
    day.setDate(day.getDate() - 1);    query.lessThan("createdAt", day);        query.find
        ({
                success:function(results)             {
                    for (var i = 0, len = results.length; i < len; i++)                 {
                        var result = results[i];
                        result.destroy();
                        console.log("Destroy: "+i);
                    }               status.success("Delete successfully.");                         },
                error: function(error)             {
                status.error("Uh oh, something went wrong.");
                console.log("Failed!");                     }
        })    });

  •  8
    Oleg replied

    Here is explained pretty well how to do it : https://www.back4app.com/docs/free-cron-job-online

  • samuel replied

    Also how do i increase video recording length??


  • [deleted] replied

    There shouldn't be a limit on the video length.

  • samuel replied

    oh okay, but videos seem to load slow.. what can i do to fasten it??

  • [deleted] replied

    A typical solution in order to make the uploading more efficient would be to compress the video before uploading it, but it will get reduced in quality.