PHP Класс Resque\Host

Автор: Michael Haynes ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$hostname The hostname
$redis The Redis instance
$timeout Host key timeout

Открытые методы

Метод Описание
__construct ( $hostname = null ) Create a new host
__toString ( ) : string Generate a string representation of this worker.
cleanup ( ) : array Cleans up any dead hosts
finished ( Worker $worker ) Mark host as having a finished worker
redisKey ( Host $host = null, string $suffix = null ) : string Get the Redis key
working ( Worker $worker ) Mark host as having an active worker

Описание методов

__construct() публичный Метод

Create a new host
public __construct ( $hostname = null )

__toString() публичный Метод

Generate a string representation of this worker.
public __toString ( ) : string
Результат string Identifier for this worker instance.

cleanup() публичный Метод

Cleans up any dead hosts
public cleanup ( ) : array
Результат array List of cleaned hosts

finished() публичный Метод

Mark host as having a finished worker
public finished ( Worker $worker )
$worker Worker The worker instance

redisKey() публичный статический Метод

Get the Redis key
public static redisKey ( Host $host = null, string $suffix = null ) : string
$host Host The host to get the key for
$suffix string To be appended to key
Результат string

working() публичный Метод

Mark host as having an active worker
public working ( Worker $worker )
$worker Worker the worker instance

Описание свойств

$hostname защищенное свойство

The hostname
protected $hostname

$redis защищенное свойство

The Redis instance
protected $redis

$timeout защищенное свойство

Host key timeout
protected $timeout