parse.com - Calling Cloud Job from Cloud Function via httpRequest always succeeds, even if job fails -
i'm trying test cloud job "processallorders" calling "testprocessallorders"(which later call bash script). seems job, whether fails or succeeds, returns empty response status 201. design? doing wrong?
thanks!
/** job testing **/ parse.cloud.define("testprocessallorders", function(request, response) { return parse.cloud.httprequest({ method: "post", url: "https://api.parse.com/1/jobs/processallorders", headers: { "x-parse-application-id": "xxx", "x-parse-master-key": "xxx", "content-type": "application/json" }, body: { } }).then(function(httpresponse) { console.log("httpresponse: " + httpresponse.text + " status: " + httpresponse.status); response.success("testprocessallorders passed"); }, function() { response.error("testprocessallorders failed: " + error.message); }); }); // *** jobs *** // parse.cloud.job("processallorders", function(request, status) { status.error("failed"); });
that call may start job, guess. cloud functions have 15 second timeout, , jobs have 15 minute timeout. wouldn't make sense function able wait job finish every time.
Comments
Post a Comment