class UpdateFederatedSearchIndex extends Job implements ShouldQueue

Traits

SerializesModels
Queueable
Dispatchable

Properties

FederatedSearchInstance $instance

The instance from which the index should be updated.

protected bool $deleteWhenMissingModels

Ignore this job if the volume does not exist any more.

protected int $backoff

Retry a failed job after 5 minutes.

Methods

void
__construct(FederatedSearchInstance $instance)

Create a new job instance.

void
handle()

Execute the job.

Validator
getValidator(Response $response)

Get the validator instance for the response.

array
updateLabelTreeIndex(array $index)

Update the indexed label trees.

array
updateProjectIndex(array $index)

Update the indexed projects.

array
updateVolumeIndex(array $index)

Update the indexed projects.

updateUserAccess(array $index, array $labelTreeIdMap, array $projectIdMap, array $volumeIdMap)

Update which user may access which federated search model that was created in this job.

cleanupDanglingModels()

Delete all federated search models of the current instance that are not accessible by any user.

Details

at line 54
void __construct(FederatedSearchInstance $instance)

Create a new job instance.

Parameters

FederatedSearchInstance $instance

The instance from which the index should be updated.

Return Value

void

at line 64
void handle()

Execute the job.

Return Value

void

at line 109
protected Validator getValidator(Response $response)

Get the validator instance for the response.

Parameters

Response $response

Return Value

Validator

at line 159
protected array updateLabelTreeIndex(array $index)

Update the indexed label trees.

Parameters

array $index

Return Value

array

Map of remote label tree IDs to local federated search model IDs.

at line 199
protected array updateProjectIndex(array $index)

Update the indexed projects.

Parameters

array $index

Return Value

array

Map of remote project IDs to local federated search model IDs.

at line 242
protected array updateVolumeIndex(array $index)

Update the indexed projects.

Parameters

array $index

Return Value

array

Map of remote volume IDs to local federated search model IDs.

at line 290
protected updateUserAccess(array $index, array $labelTreeIdMap, array $projectIdMap, array $volumeIdMap)

Update which user may access which federated search model that was created in this job.

Parameters

array $index
array $labelTreeIdMap

Map of remote label tree IDs to local federated search model IDs.

array $projectIdMap

Map of remote project IDs to local federated search model IDs.

array $volumeIdMap

Map of remote volume IDs to local federated search model IDs.

at line 358
protected cleanupDanglingModels()

Delete all federated search models of the current instance that are not accessible by any user.