feat(API): Ingest plain text (#1417)

* Add ingest/text route to ingest plain text

* Add new ingest text test and adapt ingest/file ones

* Include new API in docs

* Remove duplicated logic
This commit is contained in:
Iván Martínez
2023-12-18 21:47:05 +01:00
committed by GitHub
parent 059f35840a
commit 6eeb95ec7f
6 changed files with 198 additions and 17 deletions

View File

@@ -48,7 +48,7 @@ class LocalIngestWorker:
try:
if changed_path.exists():
logger.info(f"Started ingesting file={changed_path}")
self.ingest_service.ingest(changed_path.name, changed_path)
self.ingest_service.ingest_file(changed_path.name, changed_path)
logger.info(f"Completed ingesting file={changed_path}")
except Exception:
logger.exception(