Queue
in package
Queue class
Tags
Table of Contents
- $adapter : AdapterInterface
- Queue adapter
- $application : Application
- Application object
- $name : string
- Queue name
- $schedulers : array<string|int, Scheduler>
- Queue schedulers
- $workers : array<string|int, Worker>
- Queue workers
- __construct() : mixed
- Constructor
- adapter() : AdapterInterface
- Get the adapter
- addScheduler() : Queue
- Add a scheduler
- addSchedulers() : Queue
- Add schedulers
- addWorker() : Queue
- Add a worker
- addWorkers() : Queue
- Add workers
- application() : Application
- Get the application
- clear() : void
- Clear jobs off of the queue stack
- clearFailed() : void
- Clear failed jobs off of the queue stack
- flush() : void
- Flush all jobs off of the queue stack
- flushAll() : void
- Flush all pop queue items
- flushFailed() : void
- Flush all failed jobs off of the queue stack
- getCompletedJob() : array<string|int, mixed>
- Get completed job
- getCompletedJobs() : array<string|int, mixed>
- Get queue completed jobs
- getFailedJob() : array<string|int, mixed>
- Get failed job
- getFailedJobs() : array<string|int, mixed>
- Get queue failed jobs
- getJob() : array<string|int, mixed>
- Get job
- getJobs() : array<string|int, mixed>
- Get queue jobs
- getName() : string
- Get the queue name
- getSchedulers() : array<string|int, mixed>
- Get schedulers
- getWorkers() : array<string|int, mixed>
- Get workers
- hasApplication() : bool
- Has application
- hasCompletedJob() : bool
- Check if queue has completed job
- hasCompletedJobs() : bool
- Check if queue has completed jobs
- hasFailed() : bool
- Check if job has failed (alias)
- hasFailedJob() : bool
- Check if queue has failed job
- hasFailedJobs() : bool
- Check if queue adapter has failed jobs
- hasJob() : bool
- Check if queue has job
- hasJobs() : bool
- Check if queue has jobs
- hasSchedulers() : bool
- Has schedulers
- hasWorkers() : bool
- Has workers
- isCompleted() : bool
- Check if job is completed (alias)
- isQueued() : bool
- Check if job is queued, but hasn't run yet
- load() : Queue
- Load queue from adapter
- processAll() : Queue
- Process all schedulers and workers in the queue
- processSchedulers() : Queue
- Process schedulers in the queue
- processWorkers() : Queue
- Process schedulers in the queue
- pushAll() : array<string|int, mixed>
- Push all jobs to queue adapter
- pushSchedulers() : array<string|int, mixed>
- Push scheduled jobs to queue adapter
- pushWorkers() : array<string|int, mixed>
- Push worker jobs to queue adapter
Properties
$adapter
Queue adapter
protected
AdapterInterface
$adapter
= null
$application
Application object
protected
Application
$application
= null
$name
Queue name
protected
string
$name
= null
$schedulers
Queue schedulers
protected
array<string|int, Scheduler>
$schedulers
= []
$workers
Queue workers
protected
array<string|int, Worker>
$workers
= []
Methods
__construct()
Constructor
public
__construct(string $name, AdapterInterface $adapter[, Application $application = null ]) : mixed
Instantiate the queue object
Parameters
- $name : string
- $adapter : AdapterInterface
- $application : Application = null
Return values
mixed —adapter()
Get the adapter
public
adapter() : AdapterInterface
Return values
AdapterInterface —addScheduler()
Add a scheduler
public
addScheduler(Scheduler $scheduler) : Queue
Parameters
- $scheduler : Scheduler
Return values
Queue —addSchedulers()
Add schedulers
public
addSchedulers(array<string|int, mixed> $schedulers) : Queue
Parameters
- $schedulers : array<string|int, mixed>
Return values
Queue —addWorker()
Add a worker
public
addWorker(Worker $worker) : Queue
Parameters
- $worker : Worker
Return values
Queue —addWorkers()
Add workers
public
addWorkers(array<string|int, mixed> $workers) : Queue
Parameters
- $workers : array<string|int, mixed>
Return values
Queue —application()
Get the application
public
application() : Application
Return values
Application —clear()
Clear jobs off of the queue stack
public
clear([bool $all = false ]) : void
Parameters
- $all : bool = false
Return values
void —clearFailed()
Clear failed jobs off of the queue stack
public
clearFailed() : void
Return values
void —flush()
Flush all jobs off of the queue stack
public
flush([bool $all = false ]) : void
Parameters
- $all : bool = false
Return values
void —flushAll()
Flush all pop queue items
public
flushAll() : void
Return values
void —flushFailed()
Flush all failed jobs off of the queue stack
public
flushFailed() : void
Return values
void —getCompletedJob()
Get completed job
public
getCompletedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getCompletedJobs()
Get queue completed jobs
public
getCompletedJobs() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFailedJob()
Get failed job
public
getFailedJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getFailedJobs()
Get queue failed jobs
public
getFailedJobs() : array<string|int, mixed>
Return values
array<string|int, mixed> —getJob()
Get job
public
getJob(mixed $jobId[, bool $unserialize = true ]) : array<string|int, mixed>
Parameters
- $jobId : mixed
- $unserialize : bool = true
Return values
array<string|int, mixed> —getJobs()
Get queue jobs
public
getJobs() : array<string|int, mixed>
Return values
array<string|int, mixed> —getName()
Get the queue name
public
getName() : string
Return values
string —getSchedulers()
Get schedulers
public
getSchedulers() : array<string|int, mixed>
Return values
array<string|int, mixed> —getWorkers()
Get workers
public
getWorkers() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasApplication()
Has application
public
hasApplication() : bool
Return values
bool —hasCompletedJob()
Check if queue has completed job
public
hasCompletedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasCompletedJobs()
Check if queue has completed jobs
public
hasCompletedJobs() : bool
Return values
bool —hasFailed()
Check if job has failed (alias)
public
hasFailed(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasFailedJob()
Check if queue has failed job
public
hasFailedJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasFailedJobs()
Check if queue adapter has failed jobs
public
hasFailedJobs() : bool
Return values
bool —hasJob()
Check if queue has job
public
hasJob(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —hasJobs()
Check if queue has jobs
public
hasJobs() : bool
Return values
bool —hasSchedulers()
Has schedulers
public
hasSchedulers() : bool
Return values
bool —hasWorkers()
Has workers
public
hasWorkers() : bool
Return values
bool —isCompleted()
Check if job is completed (alias)
public
isCompleted(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —isQueued()
Check if job is queued, but hasn't run yet
public
isQueued(mixed $jobId) : bool
Parameters
- $jobId : mixed
Return values
bool —load()
Load queue from adapter
public
static load(string $name, AdapterInterface $adapter[, Application $application = null ]) : Queue
Parameters
- $name : string
- $adapter : AdapterInterface
- $application : Application = null
Return values
Queue —processAll()
Process all schedulers and workers in the queue
public
processAll() : Queue
Return values
Queue —processSchedulers()
Process schedulers in the queue
public
processSchedulers() : Queue
Return values
Queue —processWorkers()
Process schedulers in the queue
public
processWorkers() : Queue
Return values
Queue —pushAll()
Push all jobs to queue adapter
public
pushAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —pushSchedulers()
Push scheduled jobs to queue adapter
public
pushSchedulers() : array<string|int, mixed>
Return values
array<string|int, mixed> —pushWorkers()
Push worker jobs to queue adapter
public
pushWorkers() : array<string|int, mixed>