프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$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 getStorage ( ) : Cronario\Storage\StorageInterface | ||
리턴 | 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 $managerSet |