1
我正在使用Parse Cloud Job
向我們所有擁有Mandrill的用戶發送電子郵件。目前,我使用的是Parse.Cloud.httpRequest
像這樣:Can Mandrill可以被要求幹運行發送電子郵件嗎? (Parse Cloud Code)
function sendNewsletterWithMandrill(info) {
var mandrillBody = computeMandrillBodyFromInfo(info); // takes a while per user
return Parse.Cloud.httpRequest({
method: 'POST',
headers: {
'Content-Type': 'application/json;charset=utf-8'
},
url: 'https://mandrillapp.com/api/1.0/messages/send-template.json',
body: mandrillRequestBody
});
};
我想試驗表明,該實施15分鐘的掛鐘時間限制Parse Cloud Job
■找內運行。
即我希望我的代碼花時間來計算電子郵件正文,並實際執行請求,但實際上不發送電子郵件。
我該如何做到這一點?乾杯。