PHP Class vyants\daemon\controllers\WatcherDaemonController

Author: Vladimir Yants ([email protected])
Inheritance: extends vyants\daemon\DaemonController
ファイルを表示 Open project: vyants/yii2-daemon

Public Properties

Property Type Description
$daemonFolder subfolder in console/controllers

Protected Properties

Property Type Description
$firstIteration flag for first iteration

Public Methods

Method Description
init ( ) Prevent double start
isProcessRunning ( $pid ) : boolean

Protected Methods

Method Description
defineJobs ( ) : array
doJob ( $job ) : boolean Job processing body
getDaemonsList ( ) : array Daemons for check. Better way - get it from database [ ['daemon' => 'one-daemon', 'enabled' => true] .

Method Details

defineJobs() protected method

protected defineJobs ( ) : array
return array

doJob() protected method

Job processing body
protected doJob ( $job ) : boolean
$job array
return boolean

getDaemonsList() abstract protected method

.. ['daemon' => 'another-daemon', 'enabled' => false] ]
abstract protected getDaemonsList ( ) : array
return array

init() public method

Prevent double start
public init ( )

isProcessRunning() public method

public isProcessRunning ( $pid ) : boolean
$pid
return boolean

Property Details

$daemonFolder public_oe property

subfolder in console/controllers
public $daemonFolder

$firstIteration protected_oe property

flag for first iteration
protected $firstIteration