diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/SeaweedAroundPoiSingal.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/SeaweedAroundPoiSingal.groovy index 08b77989b..20def0a9b 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/SeaweedAroundPoiSingal.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/temp/shenjian/poi/SeaweedAroundPoiSingal.groovy @@ -76,6 +76,7 @@ class SeaweedAroundPoiSingal { filter.put("lat", 1) List> writeModelList = new ArrayList<>() + def count = 0 DbUtils.seaweed.find(query, filter).batchSize(10000).each {obj -> Document updateBson = new Document() Document update = new Document() @@ -102,6 +103,8 @@ class SeaweedAroundPoiSingal { writeModelList.add(updateOneModel) if (writeModelList.size() == 5000) { conn136.bulkWrite(writeModelList) + count += 5000 + println(count) writeModelList.clear() } }