修改
This commit is contained in:
+2
-1
@@ -38,13 +38,14 @@ class DistrictStatRentCleanBatch extends BaseBatch{
|
|||||||
def delRets = []
|
def delRets = []
|
||||||
for(def d : dbcursor){
|
for(def d : dbcursor){
|
||||||
if(d.district_name && !keys.contains(d.city+"@"+d.region+"@"+d.district_name)){
|
if(d.district_name && !keys.contains(d.city+"@"+d.region+"@"+d.district_name)){
|
||||||
|
println d.city+"@"+d.region+"@"+d.district_name
|
||||||
delRets << d._id
|
delRets << d._id
|
||||||
}
|
}
|
||||||
if(delRets.size()>=100){
|
if(delRets.size()>=100){
|
||||||
def delquery = new BasicDBObject()
|
def delquery = new BasicDBObject()
|
||||||
delquery.put("_id", new BasicDBObject('$in', delRets))
|
delquery.put("_id", new BasicDBObject('$in', delRets))
|
||||||
RENT_DIST_STAT_COLL.remove(delquery)
|
RENT_DIST_STAT_COLL.remove(delquery)
|
||||||
println new Date()
|
delRets.clear()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user