Class Resque_Job_Status
Inheritance | Resque_Job_Status |
---|
Status tracker/information for a job.
Public Methods
Method | Description | Defined 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
Constant | Value | Description | Defined 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
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. |
Generate a string representation of this object.
public string __toString ( ) | ||
return | string | String representation of the current job status class. |
---|
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. |
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
|
---|
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 tracking the status of a job.
public void stop ( ) |
Update the status indicator for the current job with a new status.
public void update ( $status ) | ||
$status |