Свойство | Тип | Описание | |
---|---|---|---|
$appId | |||
$config | |||
$logger | Psr\Log\LoggerInterface | ||
$managerIgnoreSet | |||
$managerSet | region MANAGER ************************************************************ | ||
$queue | |||
$redis | |||
$storage | Cronario\Storage\StorageInterface |
Метод | Описание | |
---|---|---|
__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 |
Метод | Описание | |
---|---|---|
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 | ||
Результат | string |
protected calcManagerSize ( $countJobsReady, $managerPoolSize, $managersLimit ) : float | ||
$countJobsReady | ||
$managerPoolSize | ||
$managersLimit | ||
Результат | float |
protected cleanManagerSet ( ) |
public getLogger ( ) : Psr\Log\LoggerInterface | ||
Результат | Psr\Log\LoggerInterface |
protected getProcessId ( ) : array | string | ||
Результат | array | string |
public getStorage ( ) : Cronario\Storage\StorageInterface | ||
Результат | Cronario\Storage\StorageInterface |
protected mainLoop ( ) |
protected parseManagerId ( $string ) : array | ||
$string | ||
Результат | array |
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 | ||
Результат | Psr\Log\LoggerInterface |
protected $managerSet |