class QueueableJob

Delayed Job

Properties

protected string $queue
protected int $maxRetries
protected int $retryDelay
protected DateTimeInterface|null $scheduledDateTime

Should the scheduling be delayed

protected string|null $uniquenessKey
protected string|null $referenceId
protected string|null $idToken

Token ID - available during Execution

protected int $reScheduleDelay

If not 0 the job will be re-scheduled after this delay

protected string $reScheduledJobId

Methods

__construct(Job $job)

No description

string|null
getIdToken()

ID Token will become available AFTER schedule

Job
getJob()

No description

string
getJobApiToken(string $worker = 'video')

No description

string|null
getJobCallbackURI()

Returns the URI to the job status page

getJobQueueModule()

Helper to get the JobQueue module

int
getMaxRetries()

When requested on existing job, this will show max retries left

string
getQueue()

No description

int
getReScheduleDelay()

Returns the number of seconds if the tasks should be rescheduled or false if not

string|null
getReferenceKey()

Define a reference ID which can later be used to lookup this job

int
getRetryDelay()

No description

DateTimeInterface|null
getScheduledDateTime()

No description

string|null
getUniqueId()

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

reSchedule(int $delayInSeconds = 1)

Reschedule the currently running task (can only be used in execute() function) The function will not reduce retry_count and could lead to a looped execution

schedule()

No description

setIdToken(string $idToken)

No description

setMaxRetries(int $maxRetries = 0)

How may times should a job be retried when it failed.

setQueue(string $queue)

No description

setReScheduledJobId(string $jobId)

No description

setReferenceKey(string|null $referenceId)

Define a reference ID which can later be used to lookup this job

setRetryDelay(int $retryDelay)

No description

setScheduledDateTime(DateTimeInterface|null $scheduledDateTime)

No description

setUniqueId(string|null $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

Details

at line 65
__construct(Job $job)

No description

Parameters

Job $job

at line 160
string|null getIdToken()

ID Token will become available AFTER schedule

Return Value

string|null

at line 176
Job getJob()

No description

Return Value

Job

at line 310
string getJobApiToken(string $worker = 'video')

No description

Parameters

string $worker

Return Value

string

at line 287
string|null getJobCallbackURI()

Returns the URI to the job status page

Return Value

string|null

at line 257
static JobQueueController getJobQueueModule()

Helper to get the JobQueue module

Return Value

JobQueueController

Exceptions

ModuleException

at line 75
int getMaxRetries()

When requested on existing job, this will show max retries left

Return Value

int

at line 183
string getQueue()

No description

Return Value

string

at line 134
int getReScheduleDelay()

Returns the number of seconds if the tasks should be rescheduled or false if not

Return Value

int

at line 112
string|null getReferenceKey()

Define a reference ID which can later be used to lookup this job

Return Value

string|null

at line 79
int getRetryDelay()

No description

Return Value

int

at line 269
DateTimeInterface|null getScheduledDateTime()

No description

Return Value

DateTimeInterface|null

at line 89
string|null getUniqueId()

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

Return Value

string|null

at line 218
QueueableJob reSchedule(int $delayInSeconds = 1)

Reschedule the currently running task (can only be used in execute() function) The function will not reduce retry_count and could lead to a looped execution

Parameters

int $delayInSeconds

Return Value

QueueableJob

at line 235
QueueableJob schedule()

No description

Return Value

QueueableJob

Exceptions

JsonException
ModuleException

at line 151
setIdToken(string $idToken)

No description

Parameters

string $idToken

at line 205
QueueableJob setMaxRetries(int $maxRetries = 0)

How may times should a job be retried when it failed.

You can use this setting if you expect your job to need multiple retries

Parameters

int $maxRetries

Return Value

QueueableJob

at line 192
QueueableJob setQueue(string $queue)

No description

Parameters

string $queue

Return Value

QueueableJob

at line 167
setReScheduledJobId(string $jobId)

No description

Parameters

string $jobId

at line 123
QueueableJob setReferenceKey(string|null $referenceId)

Define a reference ID which can later be used to lookup this job

Parameters

string|null $referenceId

Return Value

QueueableJob

at line 143
QueueableJob setRetryDelay(int $retryDelay)

No description

Parameters

int $retryDelay

Return Value

QueueableJob

at line 278
QueueableJob setScheduledDateTime(DateTimeInterface|null $scheduledDateTime)

No description

Parameters

DateTimeInterface|null $scheduledDateTime

Return Value

QueueableJob

at line 101
QueueableJob setUniqueId(string|null $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

Parameters

string|null $uniqueKey

Return Value

QueueableJob