Browse Source

Send failed request when document file content cannot be read

hidden_tags_with_bookmarks
Orzu Ionut 3 years ago
parent
commit
577926540c
  1. 12
      app/Jobs/IngestDocuments.php

12
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()

Loading…
Cancel
Save