新增监控

This commit is contained in:
2021-06-09 14:17:22 +08:00
parent facf6fffe5
commit f3fd6cdef6
@@ -3,6 +3,9 @@ package com.fangjia.script.gj
import com.fangjia.core.ProvinceData import com.fangjia.core.ProvinceData
import com.fangjia.core.RegionData import com.fangjia.core.RegionData
import com.fangjia.httpclient.UserAgents import com.fangjia.httpclient.UserAgents
import com.fangjia.script.BaseBatch
import com.fangjia.script.BatchOwner
import com.fangjia.script.Watcher
import com.fangjia.script.gj.paimai.GaoDeUtils import com.fangjia.script.gj.paimai.GaoDeUtils
import com.fangjia.script.util.CommonUtils import com.fangjia.script.util.CommonUtils
import com.fangjia.script.util.JacksonUtil import com.fangjia.script.util.JacksonUtil
@@ -30,14 +33,15 @@ import java.util.regex.Matcher
import java.util.regex.Pattern import java.util.regex.Pattern
import java.util.zip.GZIPInputStream import java.util.zip.GZIPInputStream
class GaoDeMapCrawl { @BatchOwner(Watcher.GaoJuan)
class GaoDeMapCrawl extends BaseBatch{
DBCollection BOUNDS_COLL = MongoUtils.getCollectionByName("fangjia_base", "city_bounds_box", "192.168.0.235", 27018) DBCollection BOUNDS_COLL = MongoUtils.getCollectionByName("fangjia_base", "city_bounds_box", "192.168.0.235", 27018)
static def targetUrl = "http://192.168.0.206:9200/amap_poi/_doc" def targetUrl = "http://192.168.0.206:9200/amap_poi/_doc"
public static final def dbUrl = "mongodb://192.168.0.235:27018"; final def dbUrl = "mongodb://192.168.0.235:27018";
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1) ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1)
final AtomicInteger count = new AtomicInteger() final AtomicInteger count = new AtomicInteger()
def updateLists = [] def updateLists = []
def updateErrorLists = [] def updateErrorLists = []
@@ -50,19 +54,13 @@ class GaoDeMapCrawl {
def totalCount = new AtomicLong() def totalCount = new AtomicLong()
static main(args) { static main(args) {
def task = new GaoDeMapCrawl(); runBatch(new GaoDeMapCrawl(), args)
// def citys = CommonUtils.findAllCity()
// def i =1
// for(def city : citys){
// i++
// println i+" "+ city
// }
task.run()
// task.allRun();
} }
@Override
void process(Object args) {
run()
}
def allRun(){ def allRun(){
def cityLations = null; def cityLations = null;
def stop = false; def stop = false;