class ProcessDelphiJob extendsJob implementsShouldQueue

Traits

InteractsWithQueue
SerializesModels
Queueable
Dispatchable

Properties

protectedImage $image The image to process.
protectedstring $gatherFile Path to the output of the Delphi gather script.
protectedfloat $distance Distance between laser points im cm to use for computation.
protectedstring $cacheKey Key of the cached count of other jobs that run on the same volume than this one.
protectedbool $deleteWhenMissingModels Ignore this job if the image does not exist any more.
int $tries The number of times the job may be attempted.

Methods

void
__construct(Image$image,float$distance,string$gatherFile,string$cacheKey =null)

Create a new job instance.

void
handle()

Execute the job.

void
failed()

Handle a job failure.

maybeDeleteGatherFile()

Handles the deletion of the gatherFile once all "sibling" jobs finished.

Details

at line75
void __construct(Image$image,float$distance,string$gatherFile,string$cacheKey =null)

Create a new job instance.

Parameters

Image $image
float $distance
string $gatherFile
string $cacheKey

Return Value

void

at line89
void handle()

Execute the job.

Return Value

void

at line127
void failed()

Handle a job failure.

Return Value

void

at line141
protected maybeDeleteGatherFile()

Handles the deletion of the gatherFile once all "sibling" jobs finished.

If more than one image is processed during a Delphi LP detection, the jobs use the cache to track how many of them are still running. They need to track this to determine when the gatherFile can be deleted. This function updates the count when a job was finished and deletes the gather file if this is the last job to finish.