PHP 클래스 ResqueScheduler_Worker

저자: Chris Boulton ([email protected])
파일 보기 프로젝트 열기: chrisboulton/php-resque-scheduler 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$logLevel Current log level of this worker.

보호된 프로퍼티들

프로퍼티 타입 설명
$interval Interval to sleep for between checking schedules.

공개 메소드들

메소드 설명
enqueueDelayedItemsForTimestamp ( DateTime | integer $timestamp ) Schedule all of the delayed jobs for a given timestamp.
handleDelayedItems ( DateTime | integer $timestamp = null ) Handle delayed items for the next scheduled timestamp.
log ( string $message ) Output a given log message to STDOUT.
work ( integer $interval = null ) The primary loop for a worker.

보호된 메소드들

메소드 설명
sleep ( ) Sleep for the defined interval.

비공개 메소드들

메소드 설명
updateProcLine ( string $status ) Update the status of the current worker process.

메소드 상세

enqueueDelayedItemsForTimestamp() 공개 메소드

Searches for all items for a given timestamp, pulls them off the list of delayed jobs and pushes them across to Resque.
public enqueueDelayedItemsForTimestamp ( DateTime | integer $timestamp )
$timestamp DateTime | integer Search for any items up to this timestamp to schedule.

handleDelayedItems() 공개 메소드

Searches for any items that are due to be scheduled in Resque and adds them to the appropriate job queue in Resque.
public handleDelayedItems ( DateTime | integer $timestamp = null )
$timestamp DateTime | integer Search for any items up to this timestamp to schedule.

log() 공개 메소드

Output a given log message to STDOUT.
public log ( string $message )
$message string Message to output.

sleep() 보호된 메소드

Sleep for the defined interval.
protected sleep ( )

work() 공개 메소드

Every $interval (seconds), the scheduled queue will be checked for jobs that should be pushed to Resque.
public work ( integer $interval = null )
$interval integer How often to check schedules.

프로퍼티 상세

$interval 보호되어 있는 프로퍼티

Interval to sleep for between checking schedules.
protected $interval

$logLevel 공개적으로 프로퍼티

Current log level of this worker.
public $logLevel