Heratio Framework API Reference

QueueJobContext
in package

Context object passed to job handlers for progress reporting and logging.

Table of Contents

Methods

__construct()  : mixed
batchId()  : int|null
Get the batch ID (null if not part of a batch).
isCancelled()  : bool
Check if the job has been cancelled (cooperative cancellation).
jobId()  : int
Get the current job ID.
log()  : void
Log an event against this job.
progress()  : void
Update job progress.

Methods

batchId()

Get the batch ID (null if not part of a batch).

public batchId() : int|null
Return values
int|null

isCancelled()

Check if the job has been cancelled (cooperative cancellation).

public isCancelled() : bool
Return values
bool

jobId()

Get the current job ID.

public jobId() : int
Return values
int

log()

Log an event against this job.

public log(string $message[, array<string|int, mixed> $details = [] ]) : void
Parameters
$message : string
$details : array<string|int, mixed> = []

progress()

Update job progress.

public progress(int $current, int $total[, string $message = '' ]) : void
Parameters
$current : int
$total : int
$message : string = ''

        
On this page

Search results