From 6363f13b0242326ff8f9243c3c8c7d8d8d3dc7b2 Mon Sep 17 00:00:00 2001 From: wangwenyan Date: Mon, 16 Jun 2025 14:04:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B9=B3=E7=B1=B3=E7=A7=9F?= =?UTF-8?q?=E9=87=91=E8=AE=A1=E7=AE=97=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../averager/InsertMonitorSquareRentCalcCommandBatch.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy index 9be5b8c21..c72b0288a 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/averager/InsertMonitorSquareRentCalcCommandBatch.groovy @@ -32,8 +32,8 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch { // public static final DSCollection SEAWEED_COLL = new DataStore("seaweed.db.fangjia.com", 27007).getCollection("fangjia.seaweed") public static final DBCollection SEAWEED_COLL = MongoUtils.getCollectionByName("fangjia", "seaweed", "mongo.db.fangjia.com") public final static DBCollection COMMAND_COLL = new MongoClient("log.mongo.db.fangjia.com", 52002).getDB('fangjia_log').getCollection('calc_command') - public final static DBCollection SQMETRE_RENT_COLL = MongoUtils.getCollectionByName("fangjia", "sqmetre_rent", "mongo.db.fangjia.com", 27017) - public final static DBCollection REGION_COLL = MongoUtils.getCollectionByName("fangjia", "region_block", "mongo.db.fangjia.com", 27017) + public final static DBCollection SQMETRE_RENT_COLL = MongoUtils.getCollectionByName("fangjia", "sqmetre_rent", "mongo.db.fangjia.com") + public final static DBCollection REGION_COLL = MongoUtils.getCollectionByName("fangjia", "region_block", "mongo.db.fangjia.com") public final static def WORKER_MACHINE_IPS = ["fangjia-priceanalysis-0", "fangjia-priceanalysis-1","fangjia-priceanalysis-2"] public final static def TOKEN="35587c9e7accc54ff7ddf2c6ebdc36a3ba065b4a2bdac78c0e9928596361b430" @@ -185,7 +185,6 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch { q.put("category", CALC_CATEGORY) q.put('status', new BasicDBObject('$in', [0,1,102])) // 0-初始状态 1-处理中 102-计算完成 2-完成 3-处理错误 4-处理异常 while(true) { - sleep(5 * 60 * 1000) def c = COMMAND_COLL.count(q) logInfo("calc command: " + c) if(c <= 0) { @@ -208,6 +207,7 @@ class InsertMonitorSquareRentCalcCommandBatch extends BaseBatch { break; } } + sleep(5 * 60 * 1000) }