pnu-update 로그작성,prod수정,spotless
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -84,28 +84,28 @@ mapsheet:
|
||||
baseurl: /app/detect/result #현재사용안함
|
||||
|
||||
file:
|
||||
sync-root-dir: /data/images/
|
||||
sync-tmp-dir: /data/repo/tmp # image upload temp dir
|
||||
sync-root-dir: /kamco-nfs/images/
|
||||
sync-tmp-dir: /kamco-nfs/repo/tmp # image upload temp dir
|
||||
sync-file-extention: tfw,tif
|
||||
|
||||
#dataset-dir: D:/data/model_output/ #변경 model_output
|
||||
dataset-dir: /data/model_output/export/ # 마운트경로 AI 추론결과
|
||||
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
|
||||
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
|
||||
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
||||
|
||||
#model-dir: D:/data/ckpt/model/
|
||||
model-dir: /data/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
#model-dir: D:/kamco-nfs/ckpt/model/
|
||||
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
model-tmp-dir: ${file.model-dir}tmp/
|
||||
model-file-extention: pth,json,py
|
||||
|
||||
pt-path: /data/ckpt/v6-cls-checkpoints/
|
||||
pt-path: /kamco-nfs/ckpt/v6-cls-checkpoints/
|
||||
pt-FileName: yolov8_6th-6m.pt
|
||||
dataset-response: /data/dataset/response/
|
||||
dataset-response: /kamco-nfs/dataset/response/
|
||||
|
||||
inference:
|
||||
url: http://127.0.0.1:8000/jobs
|
||||
batch-url: http://127.0.0.1:8000/batches
|
||||
geojson-dir: /data/requests/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
jar-path: /data/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
|
||||
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
|
||||
inference-server-name: server1,server2,server3,server4
|
||||
|
||||
gukyuin:
|
||||
@@ -113,7 +113,7 @@ gukyuin:
|
||||
cdi: ${gukyuin.url}/api/kcd/cdi
|
||||
|
||||
training-data:
|
||||
geojson-dir: /data/dataset/request/
|
||||
geojson-dir: /kamco-nfs/dataset/request/
|
||||
|
||||
layer:
|
||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||
|
||||
Binary file not shown.
@@ -34,22 +34,26 @@ public class GukYuinApiPnuJobService {
|
||||
}
|
||||
|
||||
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
|
||||
// @Scheduled(cron = "0 * * * * *")
|
||||
public void findGukYuinContListPnuUpdate() {
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
log.info("[Step 1-1] 국유인 연동까지 완료된 추론 목록 가져오기");
|
||||
log.info("=== apply_status -> 100% 다운 완료: GUK_COMPLETED, PNU매핑 실패: PNU_FAILED");
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(
|
||||
List.of(GukYuinStatus.GUK_COMPLETED.getId(), GukYuinStatus.PNU_FAILED.getId()));
|
||||
|
||||
log.info("[Step 1-2] 매핑할 추론 회차 갯수 : {}", list == null ? 0 : list.size());
|
||||
if (list.isEmpty()) {
|
||||
log.info("[Step 1-3] 매핑할 추론 회차 갯수 없어서 리턴하고 끝남");
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("[Step 2-1] 추론 회차별 pnu 매핑 for문 시작 ");
|
||||
for (LearnKeyDto dto : list) {
|
||||
try {
|
||||
processUid(dto.getUid(), dto.getUid());
|
||||
log.info("[Step 2-2] 진행하는 추론 Uid: {}", dto.getUid());
|
||||
processUid(dto.getUid());
|
||||
|
||||
gukYuinPnuJobCoreService.updateGukYuinApplyStateComplete(
|
||||
dto.getId(), GukYuinStatus.PNU_COMPLETED);
|
||||
} catch (Exception e) {
|
||||
@@ -60,15 +64,21 @@ public class GukYuinApiPnuJobService {
|
||||
}
|
||||
}
|
||||
|
||||
private void processUid(String chnDtctId, String uid) {
|
||||
ResultDto result = gukYuinApiService.listChnDtctId(chnDtctId, "Y");
|
||||
private void processUid(String uid) {
|
||||
log.info("[Step 2-4] 탐지 등록목록 상세 API 호출 시작");
|
||||
ResultDto result = gukYuinApiService.listChnDtctId(uid, "Y");
|
||||
|
||||
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
||||
log.info("[Step 2-5] 결과값 없어서 return");
|
||||
return;
|
||||
}
|
||||
|
||||
log.info("[Step 2-5] 결과값 첫번째 값 가져오기");
|
||||
ChngDetectMastDto.Basic basic = result.getResult().get(0);
|
||||
String chnDtctCnt = basic.getChnDtctCnt();
|
||||
log.info("[Step 2-6] 탐지 객체 전체 갯수 chnDtctCnt = {}", chnDtctCnt);
|
||||
if (chnDtctCnt == null || chnDtctCnt.isEmpty()) {
|
||||
log.info("[Step 2-76] 탐지 객체 전체 갯수 없어서 return");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,29 +87,44 @@ public class GukYuinApiPnuJobService {
|
||||
int totalCount = Integer.parseInt(chnDtctCnt);
|
||||
int totalPages = (totalCount + pageSize - 1) / pageSize;
|
||||
|
||||
log.info("[Step 3-1] 탐지 객체 전체 수로 페이지 계산 : {}", totalPages);
|
||||
for (int page = 0; page < totalPages; page++) {
|
||||
log.info("[Step 3-2] 페이지 별 호출 : {}", page);
|
||||
processPage(uid, page, pageSize);
|
||||
}
|
||||
}
|
||||
|
||||
private void processPage(String uid, int page, int pageSize) {
|
||||
log.info("[Step 4-1] 탐지객체 목록 API 호출 시작");
|
||||
ResultContDto resContList = gukYuinApiService.findChnContList(uid, page, pageSize, "Y");
|
||||
|
||||
if (resContList.getResult() == null || resContList.getResult().isEmpty()) {
|
||||
log.info("[Step 4-2] 탐지객체 목록 결과 없어서 return");
|
||||
return; // 외부 API 이상 방어
|
||||
}
|
||||
|
||||
List<ContBasic> contList = resContList.getResult();
|
||||
log.info("[Step 4-3] 탐지객체 목록 결과 contList.size : {}", contList == null ? 0 : contList.size());
|
||||
for (ContBasic cont : contList) {
|
||||
String[] pnuList = cont.getPnuList();
|
||||
long pnuCnt = pnuList == null ? 0 : pnuList.length;
|
||||
log.info("[Step 4-4] 객체에 연결된 pnuCnt : {}", pnuCnt);
|
||||
if (cont.getChnDtctObjtId() != null) {
|
||||
log.info(
|
||||
"[Step 4-5] inference_geom 에 pnu 갯수 update : cont.getChnDtctObjtId = {}",
|
||||
cont.getChnDtctObjtId());
|
||||
log.info(" === cont.getChnDtctObjtId : {}", cont.getChnDtctObjtId());
|
||||
log.info(" === pnuCnt : {}", pnuCnt);
|
||||
gukYuinPnuJobCoreService.updateInferenceGeomDataPnuCnt(cont.getChnDtctObjtId(), pnuCnt);
|
||||
|
||||
if (pnuCnt > 0) {
|
||||
log.info("[Step 4-6] 객체 ID로 geoUid 검색 = {}", cont.getChnDtctObjtId());
|
||||
Long geoUid =
|
||||
gukYuinPnuJobCoreService.findMapSheetAnalDataInferenceGeomUid(
|
||||
cont.getChnDtctObjtId());
|
||||
|
||||
log.info("[Step 4-7] tb_pnu 에 데이터 upsert 수행");
|
||||
log.info("===== geoUid = {}", geoUid);
|
||||
gukYuinPnuJobCoreService.insertGeoUidPnuData(geoUid, pnuList, cont.getChnDtctObjtId());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,28 +84,28 @@ mapsheet:
|
||||
baseurl: /app/detect/result #현재사용안함
|
||||
|
||||
file:
|
||||
sync-root-dir: /data/images/
|
||||
sync-tmp-dir: /data/repo/tmp # image upload temp dir
|
||||
sync-root-dir: /kamco-nfs/images/
|
||||
sync-tmp-dir: /kamco-nfs/repo/tmp # image upload temp dir
|
||||
sync-file-extention: tfw,tif
|
||||
|
||||
#dataset-dir: D:/data/model_output/ #변경 model_output
|
||||
dataset-dir: /data/model_output/export/ # 마운트경로 AI 추론결과
|
||||
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
|
||||
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
|
||||
dataset-tmp-dir: ${file.dataset-dir}tmp/
|
||||
|
||||
#model-dir: D:/data/ckpt/model/
|
||||
model-dir: /data/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
#model-dir: D:/kamco-nfs/ckpt/model/
|
||||
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
model-tmp-dir: ${file.model-dir}tmp/
|
||||
model-file-extention: pth,json,py
|
||||
|
||||
pt-path: /data/ckpt/v6-cls-checkpoints/
|
||||
pt-path: /kamco-nfs/ckpt/v6-cls-checkpoints/
|
||||
pt-FileName: yolov8_6th-6m.pt
|
||||
dataset-response: /data/dataset/response/
|
||||
dataset-response: /kamco-nfs/dataset/response/
|
||||
|
||||
inference:
|
||||
url: http://127.0.0.1:8000/jobs
|
||||
batch-url: http://127.0.0.1:8000/batches
|
||||
geojson-dir: /data/requests/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
jar-path: /data/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
|
||||
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로
|
||||
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
|
||||
inference-server-name: server1,server2,server3,server4
|
||||
|
||||
gukyuin:
|
||||
@@ -113,7 +113,7 @@ gukyuin:
|
||||
cdi: ${gukyuin.url}/api/kcd/cdi
|
||||
|
||||
training-data:
|
||||
geojson-dir: /data/dataset/request/
|
||||
geojson-dir: /kamco-nfs/dataset/request/
|
||||
|
||||
layer:
|
||||
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com
|
||||
|
||||
Reference in New Issue
Block a user