Свойство | Тип | Описание | |
---|---|---|---|
$payload | Array containing details of the job. | ||
$queue | The name of the queue that this job belongs to. | ||
$worker | Instance of the Resque worker running this job. |
Метод | Описание | |
---|---|---|
__construct ( string $queue, array $payload ) | Instantiate a new instance of a job. | |
__toString ( ) : string | Generate a string representation used to describe the current job. | |
create ( string $queue, string $class, array $args = null, boolean $monitor = false, string $id = null ) : string | Create a new job and save it to the specified queue. | |
fail ( $exception ) | Mark the current job as having failed. | |
getArguments ( ) : array | Get the arguments supplied to this job. | |
getInstance ( ) : Resque_JobInterface | Get the instantiated object for this job that will be performing work. | |
getJobFactory ( ) : Resque_Job_FactoryInterface | ||
getStatus ( ) : integer | Return the status of the current job. | |
perform ( ) : boolean | Actually execute a job by calling the perform method on the class associated with the job with the supplied arguments. | |
recreate ( ) : string | Re-queue the current job. | |
reserve ( string $queue ) : false | object | Find the next available job from the specified queue and return an instance of Resque_Job for it. | |
reserveBlocking ( array $queues, integer $timeout = null ) : false | object | Find the next available job from the specified queues using blocking list pop and return an instance of Resque_Job for it. | |
setJobFactory ( Resque_Job_FactoryInterface $jobFactory ) : Resque_Job | ||
updateStatus ( integer $status ) | Update the status of the current job. |
public __construct ( string $queue, array $payload ) | ||
$queue | string | The queue that the job belongs to. |
$payload | array | array containing details of the job. |
public __toString ( ) : string | ||
Результат | string | The string representation of the job. |
public static create ( string $queue, string $class, array $args = null, boolean $monitor = false, string $id = null ) : string | ||
$queue | string | The name of the queue to place the job in. |
$class | string | The name of the class that contains the code to execute the job. |
$args | array | Any optional arguments that should be passed when the job is executed. |
$monitor | boolean | Set to true to be able to monitor the status of a job. |
$id | string | Unique identifier for tracking the job. Generated if not supplied. |
Результат | string |
public getArguments ( ) : array | ||
Результат | array | Array of arguments. |
public getInstance ( ) : Resque_JobInterface | ||
Результат | Resque_JobInterface | Instance of the object that this job belongs to. |
public getJobFactory ( ) : Resque_Job_FactoryInterface | ||
Результат | Resque_Job_FactoryInterface |
public setJobFactory ( Resque_Job_FactoryInterface $jobFactory ) : Resque_Job | ||
$jobFactory | Resque_Job_FactoryInterface | |
Результат | Resque_Job |
public updateStatus ( integer $status ) | ||
$status | integer | Status constant from Resque_Job_Status indicating the current status of a job. |