Beanstalk\Command\StatsJob Class Ref

class Beanstalk\Command\StatsJob
Extends:Beanstalk\Command
Description:The stats-job command gives statistical information about the specified job if it exists
Author:Joshua Dechant <jdechant@shapeup.com>
Returned stats available:
  • id: The job id

  • tube: The name of the tube that contains this job

  • state: One of “ready” or “delayed” or “reserved” or “buried”

  • pri: The priority value set by the put, release, or bury commands.

  • age: The time in seconds since the put command that created this job.

  • time-left: The number of seconds left until the server puts this job

    into the ready queue. This number is only meaningful if the job is reserved or delayed. If the job is reserved and this amount of time elapses before its state changes, it is considered to have timed out.

  • reserves: The number of times this job has been reserved.

  • timeouts: The number of times this job has timed out during a reservation.

  • releases: The number of times a client has released this job from a reservation.

  • buries The number of times this job has been buried.

  • kicks: The number of times this job has been kicked.

Class Methods

Beanstalk\Command\StatsJob::__construct($id)
Description:

Constructor

Parameters:
  • $id (integer) – Job id
Beanstalk\Command\StatsJob::getCommand()
Description:Get the command to send to the beanstalkd server
Returns:string
Beanstalk\Command\StatsJob::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:

BeanstalkStats

Throws:

BeanstalkException When the job does not exist

Throws:

BeanstalkException When any other error occurs

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