Свойство | Тип | Описание | |
---|---|---|---|
$class | The classname this job | ||
$completeStatuses | of statuses that are considered final/complete | ||
$data | The data/arguments for the job | ||
$id | The ID of this job | ||
$instance | Instance of the class performing work for this job | ||
$method | The method name for this job | ||
$payload | The payload sent through for this job | ||
$queue | The name of the queue that this job belongs to | ||
$redis | The Redis instance | ||
$worker | Instance of the worker running this job |
Метод | Описание | |
---|---|---|
__construct ( string $queue, string $id, string $class, array $data = null ) | Create a new job | |
__toString ( ) : string | Generate a string representation of this object | |
cancel ( ) | Mark the current job as cancelled | |
cleanup ( array $queues = ['*'] ) | Look for any jobs which are running but the worker is dead. | |
complete ( ) | Mark the current job as complete | |
create ( string $queue, string $class, array $data = null, integer $run_at ) : string | Create a new job and save it to the specified queue. | |
createId ( string $queue, string $class, array $data = null, integer $run_at ) : string | Create a new job id | |
delay ( integer $time ) : boolean | Save the job to Redis delayed queue | |
execTime ( ) : string | Returns formatted execution time string | |
execTimeStr ( ) : string | Returns formatted execution time string | |
fail ( Exception $e ) | Mark the current job as having failed | |
failError ( ) : mixed | Returns the fail error for the job | |
getClass ( ) : string | Get the job class. | |
getData ( ) : array | Get the job data. | |
getDelayedTime ( ) : integer | Get the job delayed time | |
getId ( ) : string | Get the job id. | |
getInstance ( ) : object | Get the instantiated object for this job that will be performing work | |
getPacket ( ) : array | Fetch the packet for the job being monitored. | |
getQueue ( ) : string | Get the job queue. | |
getStatus ( ) : integer | Fetch the status for the job | |
getWorker ( ) : |
Get the queue worker interface | |
load ( string $id ) : string | Load a job from id | |
loadPayload ( string $queue, string $payload ) : string | Load a job from the Redis payload | |
perform ( ) : boolean | Perform the job | |
queue ( ) : boolean | Save the job to Redis queue | |
redisKey ( |
Get the Redis key | |
run ( ) | Mark the current job running | |
setClass ( ) | Set the job class. | |
setData ( ) | Set the job data. | |
setId ( ) | Set the job id. | |
setQueue ( ) | Set the job queue. | |
setStatus ( integer $status, Exception $e = null ) | Update the status indicator for the current job with a new status | |
setWorker ( |
Set the queue worker interface | |
toArray ( ) : array | Return array representation of this job |
Метод | Описание | |
---|---|---|
createPayload ( ) : string | Create a payload string from the given job and data | |
stopped ( ) | Mark the current job stopped This is an internal function as the job is either completed, cancelled or failed |
public __toString ( ) : string | ||
Результат | string | Representation of the current job status class |
public static create ( string $queue, string $class, array $data = null, integer $run_at ) : 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 |
$data | array | Any optional arguments that should be passed when the job is executed |
$run_at | integer | Unix timestamp of when to run the job to delay execution |
Результат | string |
public static createId ( string $queue, string $class, array $data = null, integer $run_at ) : 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 |
$data | array | Any optional arguments that should be passed when the job is executed |
$run_at | integer | Unix timestamp of when to run the job to delay execution |
Результат | string |
protected createPayload ( ) : string | ||
Результат | string |
public execTimeStr ( ) : string | ||
Результат | string |
public fail ( Exception $e ) | ||
$e | Exception |
public getDelayedTime ( ) : integer | ||
Результат | integer |
public getInstance ( ) : object | ||
Результат | object | Instance of the object that this job belongs to |
public getWorker ( ) : |
||
Результат |
public setWorker ( |
||
$worker |
protected stopped ( ) |
protected static $completeStatuses |
protected $instance |