QueueMonitor
extends BaseModel
in package
Table of Contents
Properties
- $timestamps : mixed
- $casts : mixed
- $dateFormat : mixed
- $guarded : mixed
- $table : mixed
Methods
- canBeRetried() : bool
- formatForException() : string
- getBasename() : string|null
- Get the base class name of the job.
- getData() : array<string, mixed>
- Get any optional data that has been added to the monitor model within the job.
- getElapsedInterval() : CarbonInterval
- getElapsedSeconds() : float
- Get the currently elapsed seconds.
- getException() : Throwable|null
- Recreate the exception.
- getRemainingInterval() : CarbonInterval
- getRemainingSeconds() : float
- Get the estimated remaining seconds. This requires a job progress to be set.
- hasFailed() : bool
- Check if the job has failed.
- hasSucceeded() : bool
- check if the job has succeeded.
- isFinished() : bool
- check if the job is finished.
- newEloquentBuilder() : mixed
- retry() : void
- update() : mixed
- scopeFailed() : void
- scopeLastHour() : void
- scopeOrdered() : void
- scopeSucceeded() : void
- scopeToday() : void
- scopeWhereJob() : void
Properties
$timestamps
public
mixed
$timestamps
= false
$casts
protected
mixed
$casts
= ['failed' => 'bool', 'retried' => 'bool', 'queued_at' => 'datetime', 'started_at' => 'datetime', 'finished_at' => 'datetime', 'exception' => 'json']
$dateFormat
protected
mixed
$dateFormat
= 'Y-m-d H:i:sO'
$guarded
protected
mixed
$guarded
= []
$table
protected
mixed
$table
= 'queue_monitor'
Methods
canBeRetried()
public
canBeRetried() : bool
Return values
boolformatForException()
public
formatForException() : string
Return values
stringgetBasename()
Get the base class name of the job.
public
getBasename() : string|null
Return values
string|nullgetData()
Get any optional data that has been added to the monitor model within the job.
public
getData() : array<string, mixed>
Return values
array<string, mixed>getElapsedInterval()
public
getElapsedInterval([Carbon|null $end = null ]) : CarbonInterval
Parameters
- $end : Carbon|null = null
Return values
CarbonIntervalgetElapsedSeconds()
Get the currently elapsed seconds.
public
getElapsedSeconds([Carbon|null $end = null ]) : float
Parameters
- $end : Carbon|null = null
Return values
floatgetException()
Recreate the exception.
public
getException([bool $rescue = true ]) : Throwable|null
Parameters
- $rescue : bool = true
-
Wrap the exception recreation to catch exceptions
Return values
Throwable|nullgetRemainingInterval()
public
getRemainingInterval([Carbon|null $now = null ]) : CarbonInterval
Parameters
- $now : Carbon|null = null
Return values
CarbonIntervalgetRemainingSeconds()
Get the estimated remaining seconds. This requires a job progress to be set.
public
getRemainingSeconds([Carbon|null $now = null ]) : float
Parameters
- $now : Carbon|null = null
Return values
floathasFailed()
Check if the job has failed.
public
hasFailed() : bool
Return values
boolhasSucceeded()
check if the job has succeeded.
public
hasSucceeded() : bool
Return values
boolisFinished()
check if the job is finished.
public
isFinished() : bool
Return values
boolnewEloquentBuilder()
public
newEloquentBuilder(mixed $query) : mixed
Parameters
- $query : mixed
retry()
public
retry() : void
Tags
update()
public
update([array<string|int, mixed> $attributes = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $attributes : array<string|int, mixed> = []
- $options : array<string|int, mixed> = []
scopeFailed()
protected
scopeFailed(Builder $query) : void
Parameters
- $query : Builder
scopeLastHour()
protected
scopeLastHour(Builder $query) : void
Parameters
- $query : Builder
scopeOrdered()
protected
scopeOrdered(Builder $query) : void
Parameters
- $query : Builder
scopeSucceeded()
protected
scopeSucceeded(Builder $query) : void
Parameters
- $query : Builder
scopeToday()
protected
scopeToday(Builder $query) : void
Parameters
- $query : Builder
scopeWhereJob()
protected
scopeWhereJob(Builder $query, mixed $jobId) : void
Parameters
- $query : Builder
- $jobId : mixed