TestJob
class TestJob extends Job
Class TestJob (FOR INTERNAL TESTS ONLY)
Traits
Properties
| protected callable | $statusUpdateCallback | Callback tor status updates |
from Job |
| array | $_constructArgs | todo private, then reflection in create |
from Job |
| protected string | $correlationId | ||
| protected string | $subject | ||
| protected string | $message |
Methods
No description
When execute is called from Queue an additional QueueableJob Object is passed to execute
No description
Note: This event always is being triggered by the job runner
Note: This event always is being triggered by the job runner
Note: This event may happen in the Frontend call
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
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 20
__construct($correlationId, $subject, $message)
No description
in
Job at line 28
final static object
create(...$args)
No description
at line 27
bool
execute(QueueableJob $queueableJob = null)
Execute is your primary job execution function
in
Job at line 79
bool
executeInJobQueue(QueueableJob $queueableJob)
When execute is called from Queue an additional QueueableJob Object is passed to execute
at line 40
string|null
getReferenceId()
No description
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 45
void
onAbort()
Note: This event always is being triggered by the job runner
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 50
void
onRetry()
Note: This event always is being triggered by the job runner
at line 55
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
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.