我有5K行加上我有一個很長的拉特列,我想添加另一列的位置,並創建一個GeoPoint從長期和拉特,所以我可以做一些GeoLocation從應用程序解析查詢。解析速率限制清洗數據
我已經寫了下面的cloudCode,但是因爲它使用了> 30次/秒的請求而達到了速率限制。我很高興等待1小時完成所有我想要做的事情就是創建一次地理點,然後完成。
Parse.Cloud.define("locationCleanUp", function(request, response) {
var setLocation = function(longitude,latitude) {
var point = new Parse.GeoPoint({latitude:latitude, longitude:longitude});
//console.log(point);
return point;
};
var query = new Parse.Query("WeatherSitelistCodes");
query.each(
function(result) {
//console.log(result.get('name'));
result.set("location",setLocation(result.get("longitude"),result.get("latitude")));
result.save();
},{
success: function(result) {
response.success("All Done!");
//console.log(result.set("location",setLocation(result.get("longitude"),result.get("latitude"))));
},
error: function() {
console.log("Error: " + error);
}
});
});
任何關於如何做到這一點的提示或建議將不勝感激!
我的下一個停靠港是在本地清理數據,然後上傳,但我走了這麼遠......
這有點痛苦parse.com不提供用於解決這個問題的管理控制檯中的工具,許多人必須具有長和經度,需要轉換爲他們的「GeoLocation」類型。 – isa56k