Skip to content

Commit

Permalink
fix tag issue too
Browse files Browse the repository at this point in the history
  • Loading branch information
alnutile committed Jul 9, 2024
1 parent 54db4e5 commit c97dece
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Domains/Documents/Transformers/XlsxTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Domains\Documents\TypesEnum;
use App\Models\Document;

class XlsxTransformer extends CsvTransformer
class XlsxTransformer extends CSVTransformer
{
protected Document $document;

Expand Down
14 changes: 11 additions & 3 deletions app/Jobs/WebHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ protected function processDocument(Document $document): void

$jobs[] = [
new VectorlizeDataJob($DocumentChunk),
new TagDocumentJob($document),
new SummarizeDocumentJob($document),
];

$page_number++;
Expand All @@ -54,7 +52,17 @@ protected function processDocument(Document $document): void
Bus::batch($jobs)
->name('Web Pages to Documents - '.$document->subject)
->finally(function (Batch $batch) use ($document) {
DocumentProcessingCompleteJob::dispatch($document);
Bus::batch([
[
new SummarizeDocumentJob($document),
new TagDocumentJob($document),
new DocumentProcessingCompleteJob($document),
],
])->name(sprintf('Part 2 of Process for Web Page Document %d',
$document->id))
->allowFailures()
->onQueue(LlmDriverFacade::driver($document->getDriver())->onQueue())
->dispatch();
})
->allowFailures()
->onQueue(LlmDriverFacade::driver($document->collection->getDriver())->onQueue())
Expand Down

0 comments on commit c97dece

Please sign in to comment.