去测试

This commit is contained in:
2024-11-15 14:48:44 +08:00
parent d119dfad55
commit e4b2600f3a
@@ -80,7 +80,6 @@ class TempExportData {
def fzHouseStat(){
def districts = CommonDatautils.findAllDistricts("福州", "district", ["city", "region", "name", "alias","estate_type2"])
districts = districts[0..10]
def addCount = new AtomicLong()
final CountDownLatch latch = new CountDownLatch(districts.size())
def total = districts.size()
@@ -88,8 +87,8 @@ class TempExportData {
rets << ["城市","区域","名称","上月价格","3年房源量","2年房源量", "2年第三方家数"]
for(def i=0;i<districts.size();i++){
final def o = districts[i]
// fixedThreadPool.execute(new Runnable() {
// void run() {
fixedThreadPool.execute(new Runnable() {
void run() {
try{
addCount.addAndGet(1)
def prices = CommonDatautils.queryDistrictPrices(o.city, o.region, o.name, "2024-10-01", "2024-10-31")
@@ -114,8 +113,8 @@ class TempExportData {
} finally {
latch.countDown()
}
// }
// });
}
});
}
latch.await()
return rets