Documentation

WorkerOpenAiPurge extends WorkerBase
in package

Base class for worker jobs, which are run via CLI in a separate process

Table of Contents

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
run()  : mixed
Delete all the items for a given type

Properties

$job_name

Specify a custom job name by overwriting this

protected mixed $job_name = 'Bulk Delete OpenAI items'

$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
inheritdoc
Return values
array<int, string>

getName()

Gets the job name

public getName() : string
Tags
inheritdoc
Return values
string

run()

Delete all the items for a given type

public run(string $type[, null|array<string|int, mixed> $config = [] ]) : mixed
Parameters
$type : string

As per OpenAiApi::ITEM_TYPES

$config : null|array<string|int, mixed> = []

Optional openai config override

On this page

Search results