Beanstalk\Command\Release Class Ref

class Beanstalk\Command\Release
Extends:Beanstalk\Command
Description:Release command
Author:Joshua Dechant <jdechant@shapeup.com>

The release command puts a reserved job back into the ready queue (and marks its state as “ready”) to be run by any client. It is normally used when the job fails because of a transitory error.

Class Methods

Beanstalk\Command\Release::__construct($id, $priority, $delay)
Description:

Constructor

Parameters:
  • $id (integer) – The job id to release
  • $priority (integer) – A new priority to assign to the job
  • $delay (integer) – Number of seconds to wait before putting the job in the ready queue.
Beanstalk\Command\Release::getCommand()
Description:Get the command to send to the beanstalkd server
Returns:string
Beanstalk\Command\Release::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:

boolean True if command was successful

Throws:

BeanstalkException When the server runs out of memory

Throws:

BeanstalkException When the job cannot be found or has already timed out

Throws:

BeanstalkException When any other error occurs