新增监控
This commit is contained in:
+13
-15
@@ -3,6 +3,9 @@ package com.fangjia.script.gj
|
||||
import com.fangjia.core.ProvinceData
|
||||
import com.fangjia.core.RegionData
|
||||
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.util.CommonUtils
|
||||
import com.fangjia.script.util.JacksonUtil
|
||||
@@ -30,14 +33,15 @@ import java.util.regex.Matcher
|
||||
import java.util.regex.Pattern
|
||||
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)
|
||||
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()
|
||||
def updateLists = []
|
||||
def updateErrorLists = []
|
||||
@@ -50,19 +54,13 @@ class GaoDeMapCrawl {
|
||||
def totalCount = new AtomicLong()
|
||||
|
||||
static main(args) {
|
||||
def task = new GaoDeMapCrawl();
|
||||
|
||||
// def citys = CommonUtils.findAllCity()
|
||||
// def i =1
|
||||
// for(def city : citys){
|
||||
// i++
|
||||
// println i+" "+ city
|
||||
// }
|
||||
|
||||
task.run()
|
||||
// task.allRun();
|
||||
runBatch(new GaoDeMapCrawl(), args)
|
||||
}
|
||||
|
||||
@Override
|
||||
void process(Object args) {
|
||||
run()
|
||||
}
|
||||
def allRun(){
|
||||
def cityLations = null;
|
||||
def stop = false;
|
||||
|
||||
Reference in New Issue
Block a user