1.war업데이트 스케쥴러 추가.
2.수동 실행, 로그 확인을 위한 뷰페이지 추가
master
Kurt92 5 months ago
parent 69effe43c9
commit 2bf5d780a0

@ -0,0 +1,4 @@
package com.manual.controller;
public class LogController {
}

@ -27,6 +27,14 @@ public class RunController {
@PostMapping("/menual/sinmungo-polling")
public ResponseEntity<?> sinmungoPolling() throws IOException {
sinmungoInOutScheduler.sinmungoInOutScheduler();
return ResponseEntity.ok("Success");
}
@PostMapping("/menual/sinmungo-send-answer")
public ResponseEntity<?> sinmungoSendAnswer() throws IOException {
sinmungoInOutScheduler.sinmungoAnswerSendScheduler();
return ResponseEntity.ok("Success");

@ -111,8 +111,10 @@ public class SinmungoInOutScheduler {
SinmungoDto.Send.Answers answers = xmlSend.findAnswersByStatus(StateEnum.ANSWER_STATE_ANSWER_WAIT.getCode());
//send 프로세스 실행
//todo : 조회한 객체 리턴받아서 0이면 다른메시지 보내주자 (전송할 답변이 없습니다.)
xmlSend.send(setInfo, answers);
log.info("xml 생성 성공!!!");
} catch (Exception e) {
log.error("🔥 답변실행 스케줄러 오류 발생!", e); // 여기서 예외 로그 전체 출력

@ -9,18 +9,19 @@
<label for="task">실행할 스케쥴러 선택:</label>
<select id="task">
<option value="warSync">Get War File from Update Server</option>
<option value="sinmungoPolling">Sinmungo Xml DB Polling</option>
<option value="update-war">Get War File from Update Server</option>
<option value="sinmungo-polling">Sinmungo Xml DB Polling</option>
<option value="sinmungo-send-answer">Create Xml Target Sinmungo Answer</option>
<!-- 필요한 스케쥴러 추가 -->
</select>
<button id="runSchedulerBtn">스케줄러 실행</button>
<button id="runSchedulerBtn">실행</button>
<hr>
<a href="/manual/logs">🪵 로그 보기</a>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"/>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<!--<script type="text/javascript" src="/lib/jquery.js"></script>-->
<script>
@ -36,10 +37,12 @@
onEventListener: () => {
$('#runSchedulerBtn').on('click', function () {
console.log("check")
const taskName = $('#task').val();
$.ajax({
url: '/manual/run',
url: `/menual/${taskName}`,
method: 'POST',
data: { task: taskName },
success: function (res) {
@ -56,7 +59,6 @@
$(document).ready(function(){
fn.onEventListener();
});

Loading…
Cancel
Save