Commit 7501184c authored by David's avatar David
Browse files

Backend stuff

parent 9fad39be
......@@ -85,6 +85,9 @@ class DocumentIntake(
val destination = Paths.get(storagePath.toFile().absolutePath, "$uuid.pdf")
Files.copy(source, destination)
//Delete it from the source directory
//Send it to the queue for OCR processing
}
.flatMap { doc ->
val newTag = tagRepo.findByName("new")
......
......@@ -18,7 +18,7 @@ import javax.inject.Singleton
@Singleton
class StagingWatcher(
private val config: HomeEdmsConfiguration,
private val documentProcessor: DocumentProcessor
private val documentIntake: DocumentIntake
) {
val logger = LoggerFactory.getLogger(StagingWatcher::class.java)
......@@ -71,7 +71,7 @@ class StagingWatcher(
.doOnNext {
logger.debug("Documents to process: ${it.joinToString(", ")}")
it.forEach { file ->
documentProcessor.submission.onNext(file)
documentIntake.submission.onNext(file)
}
}
.retry()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment