From 4f2e84a5d96045f408e2d16f11ccf1f96c574868 Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Wed, 25 May 2022 14:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=B9=E9=87=8F=E5=86=99?= =?UTF-8?q?=E5=85=A5=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/temp/shenjian/poi/SeaweedAroundPoiSingal.groovy | 3 +++ 1 file changed, 3 insertions(+) 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() } }