Skip to content
Snippets Groups Projects
Commit 696ea24a authored by Florian Schilling's avatar Florian Schilling
Browse files

OZG-8192: added ShedLock to FileScanJob

parent f07c7f32
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@ import org.springframework.stereotype.Component;
import de.ozgcloud.vorgang.files.FileService;
import lombok.RequiredArgsConstructor;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
@RequiredArgsConstructor
@Component
......@@ -15,6 +16,7 @@ public class FileScanJob {
private final FileScanService fileScanService;
@Scheduled(cron=FILE_SCAN_CRON)
@SchedulerLock(name="FileScan_Scheduler")
public void scanFiles() {
fileService.getFiles().forEach(fileScanService::scan);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment