Class Resque_Job_Status

InheritanceResque_Job_Status

Status tracker/information for a job.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Setup a new instance of the job monitor class for the supplied job ID. Resque_Job_Status
__toString() Generate a string representation of this object. Resque_Job_Status
create() Create a new status monitor item for the supplied job ID. Will create all necessary keys in Redis to monitor the status of a job. Resque_Job_Status
get() Fetch the status for the job being monitored. Resque_Job_Status
isTracking() Check if we're actually checking the status of the loaded job status instance. Resque_Job_Status
stop() Stop tracking the status of a job. Resque_Job_Status
update() Update the status indicator for the current job with a new status. Resque_Job_Status

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
STATUS_COMPLETE 4 Resque_Job_Status
STATUS_FAILED 3 Resque_Job_Status
STATUS_RUNNING 2 Resque_Job_Status
STATUS_WAITING 1 Resque_Job_Status

Method Details

__construct() public method

Setup a new instance of the job monitor class for the supplied job ID.

public void __construct ( $id )
$id string

The ID of the job to manage the status for.

__toString() public method

Generate a string representation of this object.

public string __toString ( )
return string

String representation of the current job status class.

create() public static method

Create a new status monitor item for the supplied job ID. Will create all necessary keys in Redis to monitor the status of a job.

public static void create ( $id )
$id string

The ID of the job to monitor the status of.

get() public method

Fetch the status for the job being monitored.

public mixed get ( )
return mixed

False if the status is not being monitored, otherwise the status as

as an integer, based on the Resque_Job_Status constants.
isTracking() public method

Check if we're actually checking the status of the loaded job status instance.

public boolean isTracking ( )
return boolean

True if the status is being monitored, false if not.

stop() public method

Stop tracking the status of a job.

public void stop ( )
update() public method

Update the status indicator for the current job with a new status.

public void update ( $status )
$status