Documentation

WorkerJobInterface extends WorkerInterface, JobInterface, JsonSerializable, JsonDeserializable

Interface for worker jobs.

Unlike the old WorkerBase, the worker configuration is stored in the instance rather than passed to the run() method.

Use the Json serialisation interfaces to convert the job to and from JSON.

Table of Contents

Methods

fromJson()  : static
Create an object from a JSON array.
getId()  : string
A unique identifier.
getMetricNames()  : array<int, string>
Gets the metric names.
getName()  : string
Gets the job name
run()  : void
Run the job.

Methods

fromJson()

Create an object from a JSON array.

public static fromJson(array<string|int, mixed> $json) : static
Parameters
$json : array<string|int, mixed>
Return values
static

getId()

A unique identifier.

public getId() : string
Return values
string

getMetricNames()

Gets the metric names.

public getMetricNames() : array<int, string>
Return values
array<int, string>

getName()

Gets the job name

public getName() : string
Return values
string
On this page

Search results