2025-03-24 16:28:14 +00:00
|
|
|
<?php
|
|
|
|
|
|
2025-08-21 12:14:52 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace BookStack\Search\Queries;
|
2025-03-24 16:28:14 +00:00
|
|
|
|
|
|
|
|
use BookStack\Entities\Models\Entity;
|
|
|
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
|
use Illuminate\Foundation\Queue\Queueable;
|
|
|
|
|
|
|
|
|
|
class StoreEntityVectorsJob implements ShouldQueue
|
|
|
|
|
{
|
|
|
|
|
use Queueable;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Create a new job instance.
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
|
|
|
|
protected Entity $entity
|
|
|
|
|
) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Execute the job.
|
|
|
|
|
*/
|
|
|
|
|
public function handle(EntityVectorGenerator $generator): void
|
|
|
|
|
{
|
|
|
|
|
$generator->generateAndStore($this->entity);
|
|
|
|
|
}
|
|
|
|
|
}
|