PHP Class AsyncPHP\Doorman\Manager\ProcessManager

Inheritance: implements AsyncPHP\Doorman\Manager
Afficher le fichier Open project: asyncphp/doorman Class Usage Examples

Protected Properties

Свойство Type Description
$shell null | AsyncPHP\Doorman\Shell

Méthodes publiques

Méthode Description
__destruct ( )
addRule ( AsyncPHP\Doorman\Rule $rule )
addTask ( AsyncPHP\Doorman\Task $task )
getBinary ( ) : string Gets the path of the PHP runtime.
getLogPath ( ) : null | string
getRules ( ) : AsyncPHP\Doorman\Rules Gets or creates a new Rules instance.
getRunning ( ) : array Get a list of the running tasks.
getShell ( ) : AsyncPHP\Doorman\Shell Gets or creates a Shell instance.
getWaiting ( ) : array Get a list of the waiting tasks.
getWorker ( ) : string Gets the path of the worker script.
removeRule ( AsyncPHP\Doorman\Rule $rule )
setBinary ( string $binary )
setLogPath ( string $logPath )
setRules ( AsyncPHP\Doorman\Rules $rules )
setShell ( AsyncPHP\Doorman\Shell $shell )
setWorker ( string $worker )
tick ( ) : boolean

Private Methods

Méthode Description
canRemoveTask ( AsyncPHP\Doorman\Task $task ) : boolean Checks whether a task can be removed from the list of running processes.
canRunTask ( AsyncPHP\Doorman\Task $task ) : boolean Checks whether a new task can be run.
getProfileForProcesses ( AsyncPHP\Doorman\Task $task, array $processes ) : AsyncPHP\Doorman\Profile Gets the load profile related to a task.
getStatsForProcesses ( array $processes ) : array Gets processor and memory stats for a list of processes.
getStdErr ( ) : string Gets the path to write stderr to.
getStdOut ( ) : string Gets the path to write stdout to.
getTaskString ( AsyncPHP\Doorman\Task $task ) : string Gets a string representation of a task, to pass to the worker script.
isTaskCancelled ( AsyncPHP\Doorman\Task $task ) : boolean Check if the given task is cancelled.
isTaskExpired ( AsyncPHP\Doorman\Task $task ) : boolean Check if the given task is expired
killTask ( AsyncPHP\Doorman\Task $task ) : boolean Revoke any background processes attached to this task.
newProfile ( ) : AsyncPHP\Doorman\Profile Creates a new Profile instance.
newRules ( ) : AsyncPHP\Doorman\Rules Creates a new Rules instance.
newShell ( ) : AsyncPHP\Doorman\Shell Creates a new Shell instance.
stopSiblingTasks ( AsyncPHP\Doorman\Task $task ) Stops sibling processes of a task.

Method Details

__destruct() public méthode

public __destruct ( )

addRule() public méthode

public addRule ( AsyncPHP\Doorman\Rule $rule )
$rule AsyncPHP\Doorman\Rule

addTask() public méthode

public addTask ( AsyncPHP\Doorman\Task $task )
$task AsyncPHP\Doorman\Task

getBinary() public méthode

Gets the path of the PHP runtime.
public getBinary ( ) : string
Résultat string

getLogPath() public méthode

public getLogPath ( ) : null | string
Résultat null | string

getRules() public méthode

Gets or creates a new Rules instance.
public getRules ( ) : AsyncPHP\Doorman\Rules
Résultat AsyncPHP\Doorman\Rules

getRunning() public méthode

Get a list of the running tasks.
public getRunning ( ) : array
Résultat array

getShell() public méthode

Gets or creates a Shell instance.
public getShell ( ) : AsyncPHP\Doorman\Shell
Résultat AsyncPHP\Doorman\Shell

getWaiting() public méthode

Get a list of the waiting tasks.
public getWaiting ( ) : array
Résultat array

getWorker() public méthode

Gets the path of the worker script.
public getWorker ( ) : string
Résultat string

removeRule() public méthode

public removeRule ( AsyncPHP\Doorman\Rule $rule )
$rule AsyncPHP\Doorman\Rule

setBinary() public méthode

public setBinary ( string $binary )
$binary string

setLogPath() public méthode

public setLogPath ( string $logPath )
$logPath string

setRules() public méthode

public setRules ( AsyncPHP\Doorman\Rules $rules )
$rules AsyncPHP\Doorman\Rules

setShell() public méthode

public setShell ( AsyncPHP\Doorman\Shell $shell )
$shell AsyncPHP\Doorman\Shell

setWorker() public méthode

public setWorker ( string $worker )
$worker string

tick() public méthode

public tick ( ) : boolean
Résultat boolean

Property Details

$shell protected_oe property

protected null|Shell,AsyncPHP\Doorman $shell
Résultat null | AsyncPHP\Doorman\Shell