class Illuminate / Queue / BeanstalkdQueue
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

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 (n) seconds.

Parameters

public

bulk ( $jobs , $data , $queue ) : void

Push an array of jobs onto the queue.

Parameters

  • $jobs array
  • $data mixed
  • $queue string|null
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.