class DoormanRunner extends BaseRunner implements TaskRunnerEngine (View source)

Runs all jobs through the doorman engine

Traits

Provides extensions to this object to integrate it with standard config API methods.

Config options

max_ticks int

How many ticks are executed per one runQueue method call set 0 for unlimited ticks

tick_interval int

How many seconds between ticks

child_runner string

Name of the dev task used to run the child process

Properties

protected string[] $defaultRules

Methods

public
getService()

Returns an instance of the QueuedJobService.

protected
writeLogLine(string $line, null|string $prefix = null)

Write in a format expected by the output medium (CLI/HTML).

protected
logDescriptorStatus(bool|null|QueuedJobDescriptor $descriptor, string $queue)

Logs the status of the queued job descriptor.

public
listJobs()

Logs the number of current jobs per queue

public static 
config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

public
mixed
stat(string $name) deprecated

Get inherited config value

public
mixed
uninherited(string $name)

Gets the uninherited value for the given config option

public
$this
set_stat(string $name, mixed $value) deprecated

Update the config value for a given property

public
$this
setDefaultRules(array $rules)

Assign default rules for this task

public
array
getDefaultRules()

No description

public
runQueue(string $queue)

Run tasks on the given queue

protected
int
getMaxTicks()

Override this method if you need a dynamic value for the configuration, for example CMS setting

protected
int
getTickInterval()

Override this method if you need a dynamic value for the configuration, for example CMS setting

protected
string
getChildRunner()

Override this method if you need a dynamic value for the configuration, for example CMS setting

protected
getNextJobDescriptorWithoutMutex(string $queue) deprecated

No description

Details

QueuedJobService getService()

Returns an instance of the QueuedJobService.

Return Value

QueuedJobService

protected writeLogLine(string $line, null|string $prefix = null)

Write in a format expected by the output medium (CLI/HTML).

Parameters

string $line

Line to be written out, without the newline character.

null|string $prefix

protected logDescriptorStatus(bool|null|QueuedJobDescriptor $descriptor, string $queue)

Logs the status of the queued job descriptor.

Parameters

bool|null|QueuedJobDescriptor $descriptor
string $queue

listJobs()

Logs the number of current jobs per queue

static Config_ForClass config()

Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).

Return Value

Config_ForClass

mixed stat(string $name) deprecated

deprecated 5.0 Use ->config()->get() instead

Get inherited config value

Parameters

string $name

Return Value

mixed

mixed uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$this set_stat(string $name, mixed $value) deprecated

deprecated 5.0 Use ->config()->set() instead

Update the config value for a given property

Parameters

string $name
mixed $value

Return Value

$this

$this setDefaultRules(array $rules)

Assign default rules for this task

Parameters

array $rules

Return Value

$this

array getDefaultRules()

No description

Return Value

array

List of rules

runQueue(string $queue)

Run tasks on the given queue

Parameters

string $queue

protected int getMaxTicks()

Override this method if you need a dynamic value for the configuration, for example CMS setting

Return Value

int

protected int getTickInterval()

Override this method if you need a dynamic value for the configuration, for example CMS setting

Return Value

int

protected string getChildRunner()

Override this method if you need a dynamic value for the configuration, for example CMS setting

Return Value

string

protected QueuedJobDescriptor|null getNextJobDescriptorWithoutMutex(string $queue) deprecated

deprecated 4.11.0 Use QueuedJobService::getNextPendingJob() instead

No description

Parameters

string $queue

Return Value

QueuedJobDescriptor|null