class Illuminate / Queue / BeanstalkdQueue
You are viewing an older version of the documentation. For the latest, please visit master documentation.

BeanstalkdQueue

Extends

Implements

Properties

protected

$pheanstalk Pheanstalk\Pheanstalk

The Pheanstalk instance.

Default: null
protected

$default string

The name of the default tube.

Default: null
protected

$timeToRun int

The "time to run" for all pushed jobs.

Default: null
protected

$blockFor int

The maximum number of seconds to block for a job.

Default: null

Methods

public

__construct ( Pheanstalk\Pheanstalk $pheanstalk , $default , $timeToRun , $blockFor , $dispatchAfterCommit ) : void

Create a new Beanstalkd queue instance.

Parameters

  • $pheanstalk Pheanstalk\Pheanstalk
  • $default string
  • $timeToRun int
  • $blockFor int
  • $dispatchAfterCommit bool
public

size ( $queue ) : int

Get the size of the queue.

Parameters

  • $queue string|null
public

push ( $job , $data , $queue ) : mixed

Push a new job onto the queue.

Parameters

  • $job string
  • $data mixed
  • $queue string|null
public

pushRaw ( $payload , $queue , array $options ) : mixed

Push a raw payload onto the queue.

Parameters

  • $payload string
  • $queue string|null
  • $options array
public

later ( $delay , $job , $data , $queue ) : mixed

Push a new job onto the queue after a delay.

Parameters

public

pop ( $queue ) : Job |null

Pop the next job off of the queue.

Parameters

  • $queue string|null
public

deleteMessage ( $queue , $id ) : void

Delete a message from the Beanstalk queue.

Parameters

  • $queue string
  • $id string|int
public

getQueue ( $queue ) : string

Get the queue or return the default.

Parameters

  • $queue string|null
public

getPheanstalk ( ) : Pheanstalk\Pheanstalk

Get the underlying Pheanstalk instance.