Properties

$app

$app : object

Application object.

Type

object

$config

$config : array

Type

array

$node

$node : \TriTan\type

Node where queues are saved.

Type

\TriTan\type

$dir

$dir : \TriTan\type

Set the directory for where pid is found.

Type

\TriTan\type

$pid

$pid : \TriTan\type

ID of the running process.

Type

\TriTan\type

$prefix

$prefix : \TriTan\type

Table prefix.

Type

\TriTan\type

$jobs

$jobs : array

Type

array

$db

$db : 

Type

$hook

$hook : 

Type

Methods

__construct()

__construct(array  $config = array()) 

Parameters

array $config

getDefaultConfig()

getDefaultConfig() : array

Returns

array

setConfig()

setConfig(array  $config) 

Parameters

array $config

getConfig()

getConfig() : array

Returns

array

jobs()

jobs() : array

Returns

array

add()

add(string  $job, array  $config) 

Add a job.

Parameters

string $job
array $config

Throws

\TriTan\Exception\Exception

node()

node() 

enqueue()

enqueue(  $args) 

Create a new job and save it to the queue or update the job if it exists.

Parameters

$args

getMyPid()

getMyPid() 

getLockLifetime()

getLockLifetime(string  $lockFile) : integer

Parameters

string $lockFile

Returns

integer

releaseLockFile()

releaseLockFile(  $lockFile) 

Parameters

$lockFile

isDue()

isDue(string|callable  $schedule) : boolean

Parameters

string|callable $schedule

Returns

boolean

run()

run() 

checkMaxRuntime()

checkMaxRuntime(string  $lockFile, array  $config) 

Parameters

string $lockFile
array $config

Throws

\TriTan\Exception\Exception