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
uninherited(string $name)

Gets the uninherited value for the given config option

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

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 uninherited(string $name)

Gets the uninherited value for the given config option

Parameters

string $name

Return Value

mixed

$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