ApplyLargoSession
class ApplyLargoSession extends Job implements ShouldQueue
Traits
Properties
string | $queue | The queue to push this job to. |
|
int | $tries | Number of times to retry this job. |
|
string | $id | The job ID. |
|
User | $user | The user who submitted the Largo session. |
|
array | $dismissedImageAnnotations | Array of all dismissed image annotation IDs for each label. |
|
array | $changedImageAnnotations | Array of all changed image annotation IDs for each label. |
|
array | $dismissedVideoAnnotations | Array of all dismissed video annotation IDs for each label. |
|
array | $changedVideoAnnotations | Array of all changed video annotation IDs for each label. |
|
bool | $force | Whether to dismiss labels even if they were created by other users. |
Methods
Create a new job instance.
Execute the job.
Remove the properties that indicate that a save Largo session is in progress.
Process the image annotations.
Process the video annotations.
Removes changes to annotations that should get a new label which no longer exists.
Removes changes to annotations where the same label was dismissed than should be attached again later.
Detach annotation labels that were dismissed in a Largo session.
Attach annotation labels that were chosen in a Largo session.
Delete annotations that now have no more labels attached.
Details
at line 105
void
__construct(string $id, User $user, array $dismissedImageAnnotations, array $changedImageAnnotations, array $dismissedVideoAnnotations, array $changedVideoAnnotations, bool $force)
Create a new job instance.
at line 122
void
handle()
Execute the job.
at line 142
void
failed(Throwable|null $exception)
Handle a job failure.
at line 151
protected void
cleanupJobId()
Remove the properties that indicate that a save Largo session is in progress.
at line 164
protected
handleImageAnnotations()
Process the image annotations.
at line 184
protected
handleVideoAnnotations()
Process the video annotations.
at line 209
protected array
ignoreDeletedLabels(array $dismissed, array $changed)
Removes changes to annotations that should get a new label which no longer exists.
at line 241
protected array
ignoreNullChanges(array $dismissed, array $changed)
Removes changes to annotations where the same label was dismissed than should be attached again later.
at line 274
protected
applyDismissedLabels(User $user, array $dismissed, bool $force, string $labelModel)
Detach annotation labels that were dismissed in a Largo session.
at line 294
protected
applyChangedLabels(User $user, array $changed, string $annotationModel, string $labelModel)
Attach annotation labels that were chosen in a Largo session.
at line 399
protected
deleteDanglingAnnotations(array $dismissed, array $changed, string $annotationModel)
Delete annotations that now have no more labels attached.