QueueProgressHelper
extends Helper
in package
uses
LocatorAwareTrait
Table of Contents
Constants
Properties
- $Progress : ProgressHelper
- $helpers : array<string|int, mixed>
- $statistics : array<string, array<string|int, int>>|null
Methods
- getTableLocator() : TableLocator
- htmlProgressBar() : string|null
- htmlTimeoutProgressBar() : string|null
- progress() : string|null
- Returns percentage as formatted value.
- progressBar() : string|null
- Returns percentage as visual progress bar.
- timeoutProgressBar() : string|null
- Returns percentage as visual progress bar.
- calculateJobProgress() : float|null
- calculateTimeoutProgress() : float|null
- Calculates the timeout progress rate.
- getJobStatistics() : array<string|int, int>
- readStatistics() : array<string, array<string|int, int>>
Constants
CONFIG
public
string
CONFIG
= 'default'
KEY
public
string
KEY
= 'queue_queued-job-statistics'
Properties
$Progress
public
ProgressHelper
$Progress
$helpers
protected
array<string|int, mixed>
$helpers
= ['Tools.Progress']
$statistics
protected
array<string, array<string|int, int>>|null
$statistics
= null
Methods
getTableLocator()
public
getTableLocator() : TableLocator
Return values
TableLocatorhtmlProgressBar()
public
htmlProgressBar(QueuedJob $queuedJob[, string|null $fallbackHtml = null ]) : string|null
Parameters
- $queuedJob : QueuedJob
- $fallbackHtml : string|null = null
Return values
string|nullhtmlTimeoutProgressBar()
public
htmlTimeoutProgressBar(QueuedJob $queuedJob[, string|null $fallbackHtml = null ]) : string|null
Parameters
- $queuedJob : QueuedJob
- $fallbackHtml : string|null = null
Return values
string|nullprogress()
Returns percentage as formatted value.
public
progress(QueuedJob $queuedJob) : string|null
Parameters
- $queuedJob : QueuedJob
Return values
string|nullprogressBar()
Returns percentage as visual progress bar.
public
progressBar(QueuedJob $queuedJob, int $length) : string|null
Parameters
- $queuedJob : QueuedJob
- $length : int
Return values
string|nulltimeoutProgressBar()
Returns percentage as visual progress bar.
public
timeoutProgressBar(QueuedJob $queuedJob, int $length) : string|null
Parameters
- $queuedJob : QueuedJob
- $length : int
Return values
string|nullcalculateJobProgress()
protected
calculateJobProgress(string $jobType, DateTime $fetched) : float|null
Parameters
- $jobType : string
- $fetched : DateTime
Return values
float|nullcalculateTimeoutProgress()
Calculates the timeout progress rate.
protected
calculateTimeoutProgress(QueuedJob $queuedJob) : float|null
Parameters
- $queuedJob : QueuedJob
Return values
float|nullgetJobStatistics()
protected
getJobStatistics(string $jobType) : array<string|int, int>
Parameters
- $jobType : string
Return values
array<string|int, int>readStatistics()
protected
readStatistics() : array<string, array<string|int, int>>