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!"); } }) });
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.
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!"); }
}) });
Here is explained pretty well how to do it : https://www.back4app.com/docs/free-cron-job-online
CubyCode
Also how do i increase video recording length??
There shouldn't be a limit on the video length.
oh okay, but videos seem to load slow.. what can i do to fasten it??
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.