class QueueableJobBuilder

Methods

build()

No description

bool
buildAndSchedule()

Build QueueableJob and schedule it

static bool
cancelAllByReferenceKey($referenceKey)

No description

static void
cancelByJobUniqueIdAndClass(string $uniqueId, string $jobClass)

Cancels job via $uniqueId and job class name

create(Job $job)

No description

static QueueableJob|null
findByJobUniqueId(string $jobClass, string $id)

No description

setDelay(int $seconds)

Set delay for job execution

setMaxRetries(int $maxRetries)

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

setQueue(string $queue)

No description

setReferenceKey(string $referenceKey)

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

setReplaceJobIfExists(bool $replaceJob = true)

No description

setScheduledDateTime(DateTimeInterface|null $dateTime)

No description

setUniqueId(string $uniqueId)

Define a unique ID which can later be used to lookup this job The ID will checked against your specific job class (no need to pass module name in id)

Details

at line 27
QueueableJob build()

No description

Return Value

QueueableJob

at line 38
bool buildAndSchedule()

Build QueueableJob and schedule it

Return Value

bool

Exceptions

JsonException
ModuleException

at line 164
static bool cancelAllByReferenceKey($referenceKey)

No description

Parameters

$referenceKey

Return Value

bool

Exceptions

ModuleException

at line 174
static void cancelByJobUniqueIdAndClass(string $uniqueId, string $jobClass)

Cancels job via $uniqueId and job class name

Parameters

string $uniqueId
string $jobClass

Return Value

void

Exceptions

ModuleException

at line 19
static QueueableJobBuilder create(Job $job)

No description

Parameters

Job $job

Return Value

QueueableJobBuilder

at line 154
static QueueableJob|null findByJobUniqueId(string $jobClass, string $id)

No description

Parameters

string $jobClass
string $id

Return Value

QueueableJob|null

Exceptions

ModuleException

at line 115
QueueableJobBuilder setDelay(int $seconds)

Set delay for job execution

Parameters

int $seconds
  • 0 means sending immediately without delay

Return Value

QueueableJobBuilder

Exceptions

Exception

at line 142
QueueableJobBuilder setMaxRetries(int $maxRetries)

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

QueueableJobBuilder

at line 102
QueueableJobBuilder setQueue(string $queue)

No description

Parameters

string $queue

Return Value

QueueableJobBuilder

at line 71
QueueableJobBuilder setReferenceKey(string $referenceKey)

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

todo use "CacheKeyObject" / beware of your scope!!

Parameters

string $referenceKey

Return Value

QueueableJobBuilder

at line 56
QueueableJobBuilder setReplaceJobIfExists(bool $replaceJob = true)

No description

Parameters

bool $replaceJob

Return Value

QueueableJobBuilder

at line 129
QueueableJobBuilder setScheduledDateTime(DateTimeInterface|null $dateTime)

No description

Parameters

DateTimeInterface|null $dateTime

Return Value

QueueableJobBuilder

at line 88
QueueableJobBuilder setUniqueId(string $uniqueId)

Define a unique ID which can later be used to lookup this job The ID will checked against your specific job class (no need to pass module name in id)

Parameters

string $uniqueId

Return Value

QueueableJobBuilder