From 78c471eec35182959e0029ded18f144974ccaca2 Mon Sep 17 00:00:00 2001 From: joonhoekim <26rote@gmail.com> Date: Thu, 23 Oct 2025 18:13:41 +0900 Subject: (김준회) 결재 템플릿 에디터 및 결재 워크플로 공통함수 작성, 실사의뢰 결재 연결 예시 작성 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- instrumentation.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'instrumentation.ts') diff --git a/instrumentation.ts b/instrumentation.ts index 3cf9e689..de353e5f 100644 --- a/instrumentation.ts +++ b/instrumentation.ts @@ -81,5 +81,23 @@ export async function register() { // console.error('Failed to start User Code sync scheduler.'); // // 스케줄러 실패해도 애플리케이션은 계속 실행 // } + + try { + // Knox 결재 액션 핸들러 초기화 (앱 시작 시 핸들러 등록) + const { initializeApprovalHandlers } = await import('./lib/approval/handlers-registry'); + await initializeApprovalHandlers(); + } catch { + console.error('Failed to initialize approval handlers.'); + // 핸들러 초기화 실패해도 애플리케이션은 계속 실행 + } + + try { + // Knox 결재 상태 폴링 스케줄러 시작 (1분마다 pending 결재 상태 확인) + const { startApprovalPollingScheduler } = await import('./lib/approval/approval-polling-service'); + await startApprovalPollingScheduler(); + } catch { + console.error('Failed to start Approval polling scheduler.'); + // 스케줄러 실패해도 애플리케이션은 계속 실행 + } } } -- cgit v1.2.3