Files
lablesys_backend/src/main/java/com/labelsys/backend/scheduled/AutoArchiveAnnotationResultJob.java

24 lines
826 B
Java
Raw Normal View History

2026-04-27 10:27:57 +08:00
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);
}
}
}