diff --git a/app/Jobs/IngestDocuments.php b/app/Jobs/IngestDocuments.php index a69ddd2..010b5d9 100644 --- a/app/Jobs/IngestDocuments.php +++ b/app/Jobs/IngestDocuments.php @@ -78,6 +78,8 @@ class IngestDocuments implements ShouldQueue $content = $this->getContent(); if ( ! $content) { + $this->failed(); + return; } @@ -102,12 +104,12 @@ class IngestDocuments implements ShouldQueue Log::error('Ingest documents failed.'); - // @TODO Delete docx, txt and md files. - if ($this->storage->exists($this->path)) { - $this->storage->delete($this->path); - } +// // @TODO Delete docx, txt and md files. +// if ($this->storage->exists($this->path)) { +// $this->storage->delete($this->path); +// } - SendToCore::dispatch(null); + SendToCore::dispatch($this->path); } protected function getContent()