@Test public void should_not_delete_file_after_import() throws Exception { settings.setDeleteImportedFiles(false); File file = createImportFile(".ser"); task.importPublicationFiles(); verify(importer).importPublicationFile(file); assertThat(file.exists(), is(true)); }
@Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") public void importPublicationFiles() { new NamedThreadTemplate().doInNamedThread("FileImportTask", this::processQueue); }
FileImportTask { @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") public void importPublicationFiles() { new NamedThreadTemplate().doInNamedThread("FileImportTask", this::processQueue); } }
FileImportTask { @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") public void importPublicationFiles() { new NamedThreadTemplate().doInNamedThread("FileImportTask", this::processQueue); }  }
FileImportTask { @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") public void importPublicationFiles() { new NamedThreadTemplate().doInNamedThread("FileImportTask", this::processQueue); }  @PostConstruct void postConstruct(); @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") void importPublicationFiles(); void doProcessFile(File file); }
FileImportTask { @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") public void importPublicationFiles() { new NamedThreadTemplate().doInNamedThread("FileImportTask", this::processQueue); }  @PostConstruct void postConstruct(); @Scheduled( initialDelayString = "${codekvast.dashboard.fileImportInitialDelaySeconds:5}000", fixedRateString = "${codekvast.dashboard.fileImportIntervalSeconds}000") void importPublicationFiles(); void doProcessFile(File file);  }