Properties

$instance

$instance : mixed

The job handler instance.

Type

mixed

$queue

$queue : string

The name of the queue the job belongs to.

Type

string

$deleted

$deleted : boolean

Indicates if the job has been deleted.

Type

boolean

$released

$released : boolean

Indicates if the job has been released.

Type

boolean

$job

$job : Object

The database job payload.

Type

Object

Methods

fire()

fire() : void

执行任务

delete()

delete() : void

删除任务

isDeleted()

isDeleted() : boolean

Determine if the job has been deleted.

Returns

boolean

release()

release(integer  $delay) : void

重新发布任务

Parameters

integer $delay

isReleased()

isReleased() : boolean

Determine if the job was released back into the queue.

Returns

boolean

isDeletedOrReleased()

isDeletedOrReleased() : boolean

Determine if the job has been deleted or released.

Returns

boolean

attempts()

attempts() : integer

获取当前任务尝试次数

Returns

integer

getRawBody()

getRawBody() : string

Get the raw body string for the job.

Returns

string

failed()

failed() : void

Call the failed method on the job instance.

getName()

getName() : string

Get the name of the queued job class.

Returns

string

getQueue()

getQueue() : string

Get the name of the queue the job belongs to.

Returns

string

resolveAndFire()

resolveAndFire(array  $payload) : void

Resolve and fire the job handler method.

Parameters

array $payload

parseJob()

parseJob(string  $job) : array

Parse the job declaration into class and method.

Parameters

string $job

Returns

array

resolve()

resolve(string  $name) : mixed

Resolve the given job handler.

Parameters

string $name

Returns

mixed

getSeconds()

getSeconds(\DateTime|integer  $delay) : integer

Calculate the number of seconds with the given delay.

Parameters

\DateTime|integer $delay

Returns

integer

getTime()

getTime() : integer

Get the current system time.

Returns

integer