PreviewJob
class PreviewJob extends Job
Traits
Properties
| protected callable | $statusUpdateCallback | Callback tor status updates |
from Job |
| array | $_constructArgs | todo private, then reflection in create |
from Job |
| protected int | $maxRetries | ||
| protected int | $versionId | ||
| protected DocumentIndex | $documentIndex |
Methods
Step 2 for video
When execute is called from Queue an additional QueueableJob Object is passed to execute
Sets the previews as failed when the job aborts.
No description
Optional: Called before serialization (e.g. to remember/convert an unserializable prop)
Optional: Called after unserialize (e.g. load from db / recover or connect resource)
Optional: Override this method and specify the properties to include during serialize null = All Properties will be serialized (default) [] = No Properties will be serialized ['id'] = $this->id will be serialized
If set to true existing previews will be regenerated in all cases
Sets the callback which should be called if the job needs to update its status As the QueueableJob has no context of the job itself this function is only available from within the execution context (daemon)
Updates the status message for this job which is being shown in user output (can only be used in execute() function)
Details
at line 31
protected
__construct(DocumentIndex $documentIndex, int $versionId)
No description
at line 23
static self
create(DocumentIndex $documentIndex, int $versionId)
No description
at line 453
void
downloadEncodedVideoHD(Document $document, string $previewFile, Preview $preview, array $params = [], QueueableJob $queueableJob = null)
Step 2 for video
at line 51
bool
execute(QueueableJob $queueableJob = null)
Main Job Execution Logic
in
Job at line 79
bool
executeInJobQueue(QueueableJob $queueableJob)
When execute is called from Queue an additional QueueableJob Object is passed to execute
in
Job at line 162
static JobStatus|null
getStatus(string $uniqueId)
Get the status of your job
in
SerializableObjectTrait at line 16
array
jsonSerialize()
No description
at line 173
void
onAbort()
Sets the previews as failed when the job aborts.
in
Job at line 151
void
onCancel()
Note: This event always is being triggered by the job runner
in
Job at line 130
void
onFinish()
Note: This event always is being triggered by the job runner
at line 164
void
onRetry()
No description
in
Job at line 123
void
onScheduled()
Note: This event may happen in the Frontend call
in
SerializableObjectTrait at line 219
void
onSerialize()
Optional: Called before serialization (e.g. to remember/convert an unserializable prop)
in
SerializableObjectTrait at line 225
void
onUnserialize()
Optional: Called after unserialize (e.g. load from db / recover or connect resource)
in
SerializableObjectTrait at line 24
SerializedObjectHelper
serializeObject()
No description
in
SerializableObjectTrait at line 212
protected array|null
serializePropertiesInclude()
Optional: Override this method and specify the properties to include during serialize null = All Properties will be serialized (default) [] = No Properties will be serialized ['id'] = $this->id will be serialized
at line 40
setForceGenerate(bool $forceGenerate)
If set to true existing previews will be regenerated in all cases
in
Job at line 104
setStatusUpdateCallback(callable $callback)
Sets the callback which should be called if the job needs to update its status As the QueueableJob has no context of the job itself this function is only available from within the execution context (daemon)
in
SerializableObjectTrait at line 90
static object
unserializeObject(SerializedObjectHelper $SerializedObjectHelper)
No description
in
SerializableObjectTrait at line 121
static object
unserializeObjectFromJSON(string $json)
No description
in
Job at line 89
protected
updateStatusMessage(string $messageToken, int|null $progress = null)
Updates the status message for this job which is being shown in user output (can only be used in execute() function)
in
Job at line 113
bool
validate()
If the return is false, the job will not be executed.