스케줄러 구조 리팩토링

This commit is contained in:
2025-03-13 14:42:17 +09:00
parent 3acb92a579
commit 64c6791cc3
20 changed files with 345 additions and 1443 deletions

View File

@@ -0,0 +1,23 @@
package com.caliverse.admin.scheduler;
import lombok.extern.slf4j.Slf4j;
@Slf4j
public abstract class CommonScheduler implements Scheduler {
@Override
public void execute() {
try {
log.info("Start executing scheduler: {}", getSchedulerType());
executeInternal();
log.info("Finished executing scheduler: {}", getSchedulerType());
} catch (Exception e) {
log.error("Error executing scheduler {}: {}", getSchedulerType(), e.getMessage(), e);
}
}
/**
* 스케줄러 구현체에서 실제 작업을 수행하는 메소드
*/
protected abstract void executeInternal();
}