Property | Type | Description | |
---|---|---|---|
$appId | |||
$config | |||
$logger | Psr\Log\LoggerInterface | ||
$managerIgnoreSet | |||
$managerSet | region MANAGER ************************************************************ | ||
$queue | |||
$redis | |||
$storage | Cronario\Storage\StorageInterface |
Method | Description | |
---|---|---|
__construct ( array $options = [] ) | ||
getAppId ( ) : string | ||
getLogger ( ) : Psr\Log\LoggerInterface | ||
getQueue ( ) : |
||
getRedis ( ) : |
||
getRedisNamespace ( ) : string | ||
getStats ( ) : array | string | ||
getStorage ( ) : Cronario\Storage\StorageInterface | ||
isStateStart ( ) : boolean | ||
kill ( ) : boolean | ||
reset ( ) | ||
restart ( ) | ||
start ( ) : boolean | START daemon | |
stop ( boolean $async = false ) : boolean |
Method | Description | |
---|---|---|
buildManagerId ( $workerClass, $managerId ) : string | ||
calcManagerSize ( $countJobsReady, $managerPoolSize, $managersLimit ) : float | ||
cleanData ( ) | ||
cleanManagerSet ( ) | Clean Manager SET | |
countManagerSet ( ) : integer | ||
decData ( $key, integer $by = 1 ) | ||
deleteData ( $key ) | ||
getConfig ( null $key = null ) : array | integer | string | null | ||
getData ( null $key = null ) : array | string | ||
getProcessId ( ) : array | string | ||
getState ( ) : array | string | ||
incData ( $key, integer $by = 1 ) | ||
isState ( $state ) : boolean | ||
mainLoop ( ) | Daemon Main Loop 1) checking if Daemon should finish work (if redis flag is finish then finish loop) 2) updating info about loop and current process 3) Migrate all 'delayed job' to 'ready queue' if time is become 4) Update Manager set with theirs worker balance (create new Managers if needed) 5) Clean Manager if they are finished theirs works 6) loop sleep cause and run again until redis flag is 'start' | |
parseManagerId ( $string ) : array | ||
processExists ( ) : boolean | ||
processKill ( ) : string | ||
setAppId ( $appId ) | ||
setConfig ( array $config ) | ||
setData ( $key, $value ) | ||
setLogger ( Psr\Log\LoggerInterface $logger ) | ||
setProcessId ( $id ) | ||
setQueue ( |
||
setRedis ( |
||
setState ( $state ) | ||
setStorage ( Cronario\Storage\StorageInterface $storage ) | ||
updateInfo ( ) | ||
updateManagerSet ( ) | Update Manager SET | |
waitManagersDone ( ) |
protected buildManagerId ( $workerClass, $managerId ) : string | ||
$workerClass | ||
$managerId | ||
return | string |
protected calcManagerSize ( $countJobsReady, $managerPoolSize, $managersLimit ) : float | ||
$countJobsReady | ||
$managerPoolSize | ||
$managersLimit | ||
return | float |
protected cleanManagerSet ( ) |
public getLogger ( ) : Psr\Log\LoggerInterface | ||
return | Psr\Log\LoggerInterface |
public getStorage ( ) : Cronario\Storage\StorageInterface | ||
return | Cronario\Storage\StorageInterface |
protected mainLoop ( ) |
protected setLogger ( Psr\Log\LoggerInterface $logger ) | ||
$logger | Psr\Log\LoggerInterface |
protected setStorage ( Cronario\Storage\StorageInterface $storage ) | ||
$storage | Cronario\Storage\StorageInterface |
protected updateManagerSet ( ) |
protected LoggerInterface,Psr\Log $logger | ||
return | Psr\Log\LoggerInterface |
protected $managerSet |