WorkerBase
in package
implements
WorkerInterface
AbstractYes
Base class for worker jobs, which are run via CLI in a separate process
Use WorkerJob instead.
Table of Contents
Interfaces
- WorkerInterface
- Interface for worker jobs.
Properties
- $job_name : mixed
- Specify a custom job name by overwriting this
- $metric_names : mixed
- Specify up to three metrics
Methods
- __construct() : mixed
- Constructor
- getMetricNames() : array<int, string>
- Gets the metric names.
- getName() : string
- Gets the job name
Properties
$job_name
Specify a custom job name by overwriting this
protected
mixed
$job_name
= ''
$metric_names
Specify up to three metrics
protected
mixed
$metric_names
= array(1 => '', 2 => '', 3 => '')
Methods
__construct()
Constructor
public
final __construct() : mixed
Manually checks if the method 'run' exists, because it's a varags, so can't use the normal abstract function approach
getMetricNames()
Gets the metric names.
public
getMetricNames() : array<int, string>
Tags
Return values
array<int, string>getName()
Gets the job name
public
getName() : string