TestJob
class TestJob extends BackgroundJob
Class TestJob (FOR INTERNAL TESTS ONLY)
Properties
protected string | $queue | from BackgroundJob | |
protected | $maxRetries | ||
protected int | $retryDelay | from BackgroundJob | |
protected callable | $statusUpdateCallback | Callback tor status updates |
from BackgroundJob |
protected string|null | $uniquenessKey | from BackgroundJob | |
protected string|null | $referenceId | from BackgroundJob | |
protected | $idToken | Token ID - available during Execution |
from BackgroundJob |
protected int | $reScheduleDelay | If not 0 the job will be re-scheduled in the passed amount of seconds |
from BackgroundJob |
protected string | $reScheduledJobId | from BackgroundJob | |
protected | $correlationId | ||
protected | $subject | ||
protected | $message |
Methods
No description
Main Function which will be executed during the running the job
Returns the number of seconds if the tasks should be rescheduled or false if not
Define a reference ID which can later be used to lookup this job
Can be implemented on the Job to avoid running the same task multiple times at once If the task already exists in the queue and is waiting or in process the next tasks won't be scheduled
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
Reschedule the currently running task (can only be used in execute() function)
No description
No description
Define a reference ID which can later be used to lookup this job
Sets the callback which should be called if the job needs to update its status As the BackgroundJob has no context of the job itself this function is only available from within the execution context (daemon)
Can be implemented on the Job to avoid running the same task multiple times at once If the task already exists in the queue and is waiting or in process the next tasks won't be scheduled
Updates the status message for this job which is being shown in user output (can only be used in execute() function)
Updates the status progress for this job (can only be used in execute() function)
Details
at line 22
__construct($correlationId, $subject, $message)
No description
in
BackgroundJob at line 305
void
callEventHandler(string $eventName)
No description
in
BackgroundJob at line 265
BackgroundJob
continueWith(BackgroundJob $job, int $delayInSeconds = 0)
No description
at line 28
bool
execute()
Main Function which will be executed during the running the job
in
BackgroundJob at line 148
string|null
getIdToken()
No description
in
BackgroundJob at line 293
protected JobQueueController|null
getJobQueueModule()
Helper to get the JobQueue module
in
BackgroundJob at line 75
int
getMaxRetries()
No description
in
BackgroundJob at line 134
int
getReScheduleDelay()
Returns the number of seconds if the tasks should be rescheduled or false if not
at line 43
string|null
getReferenceId()
Define a reference ID which can later be used to lookup this job
in
BackgroundJob at line 79
int
getRetryDelay()
No description
in
BackgroundJob at line 89
string|null
getUniquenessKey()
Can be implemented on the Job to avoid running the same task multiple times at once If the task already exists in the queue and is waiting or in process the next tasks won't be scheduled
in
BackgroundJob at line 314
array
jsonSerialize()
No description
at line 48
void
onAbort()
Note: This event always is being triggered by the job runner
in
BackgroundJob at line 192
void
onCancel()
Note: This event always is being triggered by the job runner
in
BackgroundJob at line 171
void
onFinish()
Note: This event always is being triggered by the job runner
at line 53
void
onRetry()
Note: This event always is being triggered by the job runner
at line 58
void
onScheduled()
Note: This event may happen in the Frontend call
in
BackgroundJob at line 203
protected
reSchedule(int $delayInSeconds = 0)
Reschedule the currently running task (can only be used in execute() function)
in
BackgroundJob at line 246
BackgroundJob
schedule(int $delayInSeconds = 0)
No description
in
BackgroundJob at line 284
string
serialize()
Encodes all relevant settings for this job into a json string
in
BackgroundJob at line 141
setIdToken(string $idToken)
No description
at line 63
setInternal(string $s)
No description
at line 67
setMaxRetries(int $a)
No description
in
BackgroundJob at line 155
setReScheduledJobId(string $jobId)
No description
in
BackgroundJob at line 123
BackgroundJob
setReferenceId(string $referenceId)
Define a reference ID which can later be used to lookup this job
in
BackgroundJob at line 233
setStatusUpdateCallback(callable $callback)
Sets the callback which should be called if the job needs to update its status As the BackgroundJob has no context of the job itself this function is only available from within the execution context (daemon)
in
BackgroundJob at line 101
BackgroundJob
setUniquenessKey(string $uniqueKey)
Can be implemented on the Job to avoid running the same task multiple times at once If the task already exists in the queue and is waiting or in process the next tasks won't be scheduled
in
BackgroundJob at line 212
protected
updateStatusMessage(string $messageToken)
Updates the status message for this job which is being shown in user output (can only be used in execute() function)
in
BackgroundJob at line 222
protected
updateStatusProgress(int $progress)
Updates the status progress for this job (can only be used in execute() function)
in
BackgroundJob at line 69
bool
validate()
If the return is false, the job will not be executed.