Méthode |
Description |
|
__construct ( callable $cb = null ) |
Constructor |
|
__invoke ( mixed $name = null, callable $cb = null ) : void |
Adds new job or calls execute() method |
|
addJob ( string $name, callable $cb ) : boolean |
Adds job |
|
addListener ( callable $cb ) : void |
Adds listener |
|
checkQueue ( ) : void |
Called automatically. Checks whether if the queue is full. If not, tries to pull more jobs from backlog and 'more' |
|
cleanup ( ) : void |
Clean up |
|
execute ( ) : void |
Runs the job |
|
getResult ( string $jobname ) : mixed |
Get result |
|
getResults ( ) : array |
Returns associative array of results |
|
hasCompleted ( ) : boolean |
Has completed? |
|
isQueueFull ( ) : boolean |
Returns whether or not the queue is full (maxConcurrency option exceed) |
|
keep ( boolean $keep = true ) : void |
Keep |
|
maxConcurrency ( integer $n ) : this |
Sets a limit of simultaneously executing tasks |
|
more ( callable $cb = null ) : this |
Sets a callback which is going to be fired always when we have a room for more jobs |
|
offsetExists ( string $j ) : boolean |
Handler of isset($job[$name]) |
|
offsetGet ( string $j ) : mixed |
Handler of $job[$name] |
|
offsetSet ( string $j, mixed $v ) : void |
Handler of $job[$name] = $value |
|
offsetUnset ( string $j ) : void |
Handler of unset($job[$name]) |
|
setResult ( string $jobname, mixed $result = null ) : boolean |
Set result |
|