Beanstalk\Command\Peek Class Ref

class Beanstalk\Command\Peek
Extends:Beanstalk\Command
Description:The peek commands let the client inspect a job in the system
Author:Joshua Dechant <jdechant@shapeup.com>
There are four variations. All but the first operate only on the currently used tube.
  • peek $id - return job $id
  • ready - return the next ready job
  • delayed - return the delayed job with the shortest delay left
  • buried - return the next job in the list of buried jobs

Class Methods

Beanstalk\Command\Peek::__construct($what)
Description:

Constructor

Parameters:
  • $what (mixed) – What to peek. One of job id, “ready”, “delayed”, or “buried”
Beanstalk\Command\Peek::getCommand()
Description:Get the command to send to the beanstalkd server
Returns:string
Beanstalk\Command\Peek::parseResponse($response[, $data = null, $conn = null])
Description:

Parse the response for success or failure.

Parameters:
  • $response (string) – Response line, i.e, first line in response
  • $data (string) – Data recieved with reponse, if any, else null
  • $conn (BeanstalkConnection) – BeanstalkConnection use to send the command
Returns:

BeanstalkJob

Throws:

BeanstalkException When the job doesn’t exist or there are no jobs in the requested state

Throws:

BeanstalkException When any other error occurs

Beanstalk\Command\Peek::returnsData()
Description:Does the command return data?
Returns:boolean