package com.labelsys.backend.scheduled; import com.labelsys.backend.service.AnnotationResultArchiveService; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; @Slf4j @Component @RequiredArgsConstructor public class AutoArchiveAnnotationResultJob { private final AnnotationResultArchiveService annotationResultArchiveService; @Scheduled(fixedDelayString = "${labelsys.annotation.auto-archive-fixed-delay:300000}") public void autoArchiveEligibleResults() { int archivedCount = annotationResultArchiveService.autoArchiveEligibleResults(); if (archivedCount > 0) { log.info("auto archived annotation results, count={}", archivedCount); } } }