PHP 클래스 Disque\Queue\Queue

파일 보기 프로젝트 열기: mariano/disque-php

보호된 프로퍼티들

프로퍼티 타입 설명
$client Disque\Client Client
$name string Name

공개 메소드들

메소드 설명
__construct ( Client $client, string $name ) Create a queue
failed ( Disque\Queue\JobInterface $job ) : void Marks the job as failed and returns it to the queue
processed ( Disque\Queue\JobInterface $job ) : void Acknowledges a Job as properly handled
processing ( Disque\Queue\JobInterface $job ) : integer Marks that a Job is still being processed
pull ( integer $timeout ) : Disque\Queue\Job | null Pulls a single job from the queue (if none available, and if $timeout specified, then wait only this much time for a job, otherwise return null)
push ( Disque\Queue\JobInterface $job, array $options = [] ) : Disque\Queue\JobInterface Pushes a job into the queue
schedule ( Disque\Queue\JobInterface $job, DateTime $when ) : Disque\Queue\JobInterface Pushes a job into the queue, setting it to be up for processing only at the specific date & time.
setMarshaler ( Disque\Queue\Marshal\MarshalerInterface $marshaler ) : void Set Job marshaler

비공개 메소드들

메소드 설명
checkConnected ( ) : void Check that we are connected to a node, and if not connect

메소드 상세

__construct() 공개 메소드

Create a queue
public __construct ( Client $client, string $name )
$client Disque\Client Client
$name string Queue name

failed() 공개 메소드

This increases the NACK counter of the job
public failed ( Disque\Queue\JobInterface $job ) : void
$job Disque\Queue\JobInterface
리턴 void

processed() 공개 메소드

Acknowledges a Job as properly handled
public processed ( Disque\Queue\JobInterface $job ) : void
$job Disque\Queue\JobInterface Job
리턴 void

processing() 공개 메소드

Marks that a Job is still being processed
public processing ( Disque\Queue\JobInterface $job ) : integer
$job Disque\Queue\JobInterface Job
리턴 integer Number of seconds that the job visibility was postponed

pull() 공개 메소드

Pulls a single job from the queue (if none available, and if $timeout specified, then wait only this much time for a job, otherwise return null)
public pull ( integer $timeout ) : Disque\Queue\Job | null
$timeout integer If specified, wait these many seconds
리턴 Disque\Queue\Job | null A job, or null if no job was found before timeout

push() 공개 메소드

Pushes a job into the queue
public push ( Disque\Queue\JobInterface $job, array $options = [] ) : Disque\Queue\JobInterface
$job Disque\Queue\JobInterface Job
$options array ADDJOB options sent to the client
리턴 Disque\Queue\JobInterface Job pushed

schedule() 공개 메소드

Pushes a job into the queue, setting it to be up for processing only at the specific date & time.
public schedule ( Disque\Queue\JobInterface $job, DateTime $when ) : Disque\Queue\JobInterface
$job Disque\Queue\JobInterface Job
$when DateTime Date & time on when job should be ready for processing
리턴 Disque\Queue\JobInterface Job pushed

setMarshaler() 공개 메소드

Set Job marshaler
public setMarshaler ( Disque\Queue\Marshal\MarshalerInterface $marshaler ) : void
$marshaler Disque\Queue\Marshal\MarshalerInterface
리턴 void

프로퍼티 상세

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

Client
protected Client,Disque $client
리턴 Disque\Client

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

Name
protected string $name
리턴 string