From e1530aee10d85026c8e944b1f03cc9b028ca0253 Mon Sep 17 00:00:00 2001 From: Chris Park Date: Wed, 24 Jan 2024 10:04:04 +0900 Subject: [PATCH] chore: add error messages on scheduling --- .../domain/search/OpenSearchLoadProdScheduler.java | 3 +++ .../domain/search/OpenSearchLoadTestScheduler.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadProdScheduler.java b/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadProdScheduler.java index 43fc146b..f67e5377 100644 --- a/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadProdScheduler.java +++ b/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadProdScheduler.java @@ -39,8 +39,11 @@ public void loadEntireData() throws IOException { log.info("Job loadEntireData skipped by this instance"); } } catch (InterruptedException e) { + log.error("Job loadEntireData error" + e.getMessage()); + lock.unlock(); Thread.currentThread().interrupt(); } finally { + log.info("Job loadEntireData reached finally"); lock.unlock(); } diff --git a/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadTestScheduler.java b/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadTestScheduler.java index 78c4fb86..6f904506 100644 --- a/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadTestScheduler.java +++ b/src/main/java/com/depromeet/breadmapbackend/domain/search/OpenSearchLoadTestScheduler.java @@ -39,8 +39,11 @@ public void loadEntireData() throws IOException { log.info("Job loadEntireData skipped by this instance"); } } catch (InterruptedException e) { + log.error("Job loadEntireData error" + e.getMessage()); + lock.unlock(); Thread.currentThread().interrupt(); } finally { + log.info("Job loadEntireData reached finally"); lock.unlock(); }