diff --git a/server/src/main/java/amosproj/server/Scheduler.java b/server/src/main/java/amosproj/server/Scheduler.java index 73a9a3d..c157676 100644 --- a/server/src/main/java/amosproj/server/Scheduler.java +++ b/server/src/main/java/amosproj/server/Scheduler.java @@ -1,6 +1,5 @@ package amosproj.server; -import amosproj.server.linter.Linter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.TaskScheduler; import org.springframework.scheduling.support.CronTrigger; @@ -8,6 +7,7 @@ @Service public class Scheduler { + @Autowired private TaskScheduler executor; diff --git a/server/src/main/java/amosproj/server/linter/Crawler.java b/server/src/main/java/amosproj/server/linter/Crawler.java index 6022785..c2f36ea 100644 --- a/server/src/main/java/amosproj/server/linter/Crawler.java +++ b/server/src/main/java/amosproj/server/linter/Crawler.java @@ -28,9 +28,10 @@ public class Crawler { private Long size; public Crawler(GitLab gitLab, Scheduler scheduler, Linter linter) { + // set autowired this.gitLab = gitLab; this.linter = linter; - + // init crawler status crawlerActive = new AtomicBoolean(false); progress = Config.getConfigNode().get("settings").get("crawler").get("status").get("inactive").asText(); timeTaken = 0L;